Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.193.583 Times

DBIx::Class::LibXMLdoc 0.03

  Date Added: February 08, 2010  |  Visits: 1.051

DBIx::Class::LibXMLdoc

Report Broken Link
Printer Friendly Version


Product Homepage
Download (95 downloads)



DBIx::Class::LibXMLdoc is a Perl module to create an adjunct "Doc" accessor of a columns data which is automatically parsed into a LibXML documentElement (alpha-software). SYNOPSIS package My::DB::thingy; __PACKAGE__->load_components(qw/ PK::Auto LibXMLdoc Core /); __PACKAGE__->table(thingy); __PACKAGE__->add_columns(qw/ id title body created owner whatever /); __PACKAGE__->set_primary_key(id); __PACKAGE__->libXMLdoc_columns(qw/ body /); package main; use My::DB; my $schema = My::DB->connect(...); my $thingy = $schema->resultset("thingy")->find(153); print $thingy->bodyDoc->toString, "nn"; print $thingy->bodyDoc->textContent, "n"; This DBIx::Class component does not alter your data in any way. It takes column names to get the value from the column, parse it into XML with LibXML and make the documentElement object available via an autogenerated accessor named by affixing the column with "Doc." The XML parsing is on demand so it doesnt waste time doing it to data you dont use or by doing it more than once to data that is unchanged. A wrapper XML tag for the mini-document is auto-generated from the table + column name. So- my $xhmlt = <<"; < p > Aint no doubt Jesus see us< br/ > Acting foolishly on American Bandstand < /p > my $thingy = $schema->resultset("thingy") ->create({ title => "Gullah", body => $xhtml }); my $root = $thingy->bodyDoc; print $root->toString, $/; # gives us ---------------- < thingybody >< p > Aint no doubt Jesus see us< br/ > Acting foolishly on American Bandstand < /p >< /thingybody > The returned item, $root above, is the < doc-documentElement >> of a XML::LibXML::Document. It returns the documentElement instead of the document object itself because the document object is less frequently/directly useful and in the cases you might want it, e.g. to modify the document with new nodes, you can still get it with ownerDocument. E.g.- my $doc = $root->ownerDocument; my $title = $doc->createElement("h1"); my $text = $doc->createTextNode($thingy->title); $title->appendChild($text); $root->insertBefore($title, $root->firstChild); print $root->ownerDocument->toString, $/; # NOW gives us (spacing added) ------ < ?xml version="1.0" encoding="utf-8"? > < thingybody > < h1 >Gullah< /h1 > < p > Aint no doubt Jesus see us< br/ > Acting foolishly on American Bandstand < /p >< /thingybody > The encoding, as utf-8 above, is only set if the UTF8Columns component is also being used on the column. I believe this means load order matters. I.e. it should be- __PACKAGE__->load_components(qw/ UTF8Columns LibXMLdoc Core /); When youre using both..

Requirements: No special requirements
Platforms: Linux
Keyword: Accessor Columns Data Dbix Dbixclasslibxmldoc Doc Libraries Libxmldoc Module Package Perl Perl Module Programming To Create
Users rating: 0/10

License: Freeware Size: 5.12 KB
USER REVIEWS
More Reviews or Write Review


DBIX::CLASS::LIBXMLDOC RELATED
Automotive Information Databases  -  My Data on the Web 2.0.2
My Data on the Web is the fastest, easiest and most reliable way to create an application to manage your data on your workstation, your home or office network or on the public Internet. It's as simple as 1, 2, 3 - Go! 1.Create your data...
38.15 MB  
Dictionaries  -  iCognition 1.0
iCognition (iCog) is a software package that enables research labs to create and administer batteries of tests online, as well as retrieve the data collected from subjects. It's being developed by The Neuroinformatics Research Group at Harvard.
211.12 KB  
Libraries  -  DBIx::Class::Schema::Loader::RelBuilder 0.03007
DBIx::Class::Schema::Loader::RelBuilder is a Perl module that builds relationships for DBIx::Class::Schema::Loader. This class builds relationships for DBIx::Class::Schema::Loader. This is module is not (yet) for external use. METHODS new...
32.77 KB  
Libraries  -  Data::Generate 0.01
Data::Generate allows you to create various types of synthetic data by parsing "regex-like" data creation rules. This module generates data by parsing given text statements (data creation rules). These statements are flexible and powerful...
25.6 KB  
Libraries  -  Data::Walker 1.05
Data::Walker is a tool for navigating through Perl data structures. SYNOPSIS Without any explicit objects: use Data::Walker; Data::Walker->cli( $data_structure ); Object-style invocation: use Data::Walker; my $w = new Data::Walker;...
20.48 KB  
Programming  -  Data::Stream::Bulk 0.07
This module tries to find middle ground between one at a time and all at once processing of data sets. The purpose of this module is to avoid the overhead of implementing an iterative api when this isn't necessary, without breaking...
10.24 KB  
Libraries  -  GNU Classpath 0.95
GNU Classpath (essential libraries for Java) is a project to create free core class libraries for use with virtual machines and compilers for the Java programming language. GNU Classpath project includes all native methods and core classes...
6.5 MB  
Database Tools  -  PacketDB 0.01
PacketDB projects goal is to create a set of workflows that treat tcpdumps/packet captures as just another sort of data to be loaded into relational structures and manipulated using the well-established methods of relational databases. The real...
10.24 KB  
Libraries  -  Image::WorldMap 0.14
Image::WorldMap is a Perl module to create graphical world maps of data. SYNOPSIS use Image::WorldMap; my $map = Image::WorldMap->new("earth-small.png", "maian/8"); $map->add(4.91, 52.35, "Amsterdam.pm"); $map->add(-2.355399, 51.3828,...
84.99 KB  
Science  -  RLPlot 1.3
RLPlot project is is a plotting program to create high quality graphs from data. Based on values stored in a spreadsheet several menus help you to create graphs of your choice. The Graphs are displayed as you get them (WYSIWIG). Double click any...
993.28 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB