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

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

Serving Software Downloads in 976 Categories, Downloaded 29.545.495 Times

DBIx::Class::LibXMLdoc 0.03

  Date Added: February 08, 2010  |  Visits: 721

DBIx::Class::LibXMLdoc

Report Broken Link
Printer Friendly Version


Product Homepage
Download (70 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  -  Doc::Perlish 0.14
Doc::Perlish is a Perl module that contains Perl Documentation Tools. SYNOPSIS my $doc = Doc::Perlish->new( type => "POD", input => "source.pod" ); # simple conversions; my $html = $doc->to_html; # DOM-style interface; see...
56.32 KB  
Libraries  -  DBIx::TableHash 1.05
DBIx::TableHash is a Perl module that can tie a hash to a mysql table + SQL utils. SYNOPSIS use DBIx::TableHash; my $DBHash = DBIx::TableHash->create_or_die (my $Params = { DBIDriver => mysql, Database => mydatabase, HostName =>...
17.41 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::PropertyList 1998.1217
Data::PropertyList is a Perl module that can convert arbitrary objects to/from strings. SYNOPSIS use Data::PropertyList qw(astext fromtext); $hash_ref = { items => [ 7 .. 11 ], key => value }; $string = astext($hash_ref); # ... $hash_ref...
8.19 KB  
Libraries  -  Data::Dumper 2.121
Data::Dumper module contains stringified perl data structures, suitable for both printing and eval. SYNOPSIS use Data::Dumper; # simple procedural interface print Dumper($foo, $bar); # extended usage with names print...
31.74 KB  
Libraries  -  DBIx::Log4perl 0.09
DBIx::Log4perl is a Perl extension for DBI to selectively log SQL, parameters, result-sets, transactions etc to a Log::Log4perl handle. SYNOPSIS use Log::Log4perl; use DBIx::Log4perl; Log::Log4perl->init("/etc/mylog.conf"); my $dbh =...
17.41 KB  
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
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  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
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  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB