Main > Programming > Libraries >

Class::XML 0.06

Class::XML 0.06

Sponsored Links

Class::XML 0.06 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.018 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1142
Date added: 2006-09-07
Publisher: Matt S Trout

Class::XML 0.06 description

Class::XML is a Perl module for simple XML Abstraction.

SYNOPSIS

package Foo;

use base qw/Class::XML/;

__PACKAGE__->has_attributes(qw/length colour/);
__PACKAGE__->has_child(bar => Bar);

package Bar;

use base qw/Class::XML/;

__PACKAGE__->has_parent(foo);
__PACKAGE__->has_attribute(counter);

# Meanwhile, in another piece of code -

my $foo = Foo->new( xml => # Or filename or ioref or parser
qq!< foo length="3m" colour="pink" >< bar / >< /foo >! );

$foo->length; # Returns "3m"
$foo->colour("purple"); # Sets colour to purple

print $foo; # Outputs

my $new_bar = new Bar; # Creates empty Bar node

$new_bar->counter("formica");

$foo->bar($new_bar); # Replaces child

$new_bar->foo->colour; # Returns "purple"

$foo->colour(undef); # Deletes colour attribute

print $foo; # Outputs < foo length="3m" >< bar counter="formica" / >< /foo >

Class::XML is designed to make it reasonably easy to create, consume or modify XML from Perl while thinking in terms of Perl objects rather than the available XML APIs; it was written out of a mixture of frustration that JAXB (for Java) and XMLSerializer (for .Net) provided programming capabilities that simply werent easy to do in Perl with the existing modules, and the sheer pleasure that Ive had using Class::DBI.

The aim is to provide a convenient abstraction layer that allows you to put as much of your logic as you like into methods on a class tree, then throw some XML at that tree and get back a tree of objects to work with. It should also be easy to get started with for anybody familiar with Class::DBI (although I doubt you could simply switch them due to the impedance mismatch between XML and relational data) and be pleasant to use from the Template Toolkit.

Finally, all Class::XML objects are also XML::XPath nodes so the full power of XPath is available to you if Class::XML doesnt provide a shortcut to what youre trying to do (but if you find it doesnt on a regular basis, contact me and Ill see if I can fix that.

Class::XML 0.06 Screenshot

Advertisements

Class::XML 0.06 Keywords

Bookmark Class::XML 0.06

Hyperlink code:
Link for forum:

Class::XML 0.06 Copyright

WareSeeker periodically updates pricing and software information of Class::XML 0.06 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Class::XML 0.06 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Pod::XML is a Perl module to convert POD to XML. Free Download
Search::Tools::XML are methods for playing nice with XML and HTML. Free Download
RSS Writer class is XML-RSS feed generator for content syndication. Free Download
PLJava is Perl module that will embed Perl into Java. Free Download
PHP AnyXML is an XML read-only class which offers PHP5 SimpleXMLs capabilities on ANY host. Free Download
XML::Output is a Perl module for writing simple XML documents. Free Download
Test::XML::XPath is a Perl module to test XPath assertions. Free Download
Class::Multimethods::Pure is a Perl module that contains a method-ordered multimethod dispatch. Free Download