Main > Programming > Libraries >

XML::SimpleObject 0.53

XML::SimpleObject 0.53

Sponsored Links

XML::SimpleObject 0.53 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.011 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1230
Date added: 2006-06-14
Publisher: Dan Brian

XML::SimpleObject 0.53 description

XML::SimpleObject is a Perl extension allowing a simple object representation of a parsed XML::Parser tree.

SYNOPSIS

use XML::SimpleObject;

# Construct with the key/value pairs as argument; this will create its
# own XML::Parser object.
my $xmlobj = new XML::SimpleObject(XML => $XML, ErrorContext => 2);

# ... or construct with the parsed tree as the only argument, having to
# create the XML::Parser object separately.
my $parser = new XML::Parser (ErrorContext => 2, Style => "Tree");
my $xmlobj = new XML::SimpleObject ($parser->parse($XML));

my $filesobj = $xmlobj->child("files")->child("file");

$filesobj->name;
$filesobj->value;
$filesobj->attribute("type");

%attributes = $filesobj->attributes;
@children = $filesobj->children;
@some_children = $filesobj->children("some");
@chilren_names = $filesobj->children_names;

This is a short and simple class allowing simple object access to a parsed XML::Parser tree, with methods for fetching children and attributes in as clean a manner as possible. My apologies for further polluting the XML:: space; this is a small and quick module, with easy and compact usage. See XML::SimpleObject::LibXML for the same interface for XML::LibXML.

USAGE

$xmlobj = new XML::SimpleObject($parser->parse($XML))

$parser is an XML::Parser object created with Style "Tree":

my $parser = new XML::Parser (ErrorContext => 2, Style => "Tree");
After creating $xmlobj, this object can now be used to browse the XML tree with the following methods.

$xmlobj->child(NAME)

This will return a new XML::SimpleObject object using the child element NAME.

$xmlobj->children(NAME)

Called with an argument NAME, children() will return an array of XML::SimpleObject objects of element NAME. Thus, if $xmlobj represents the top-level XML element, children will return an array of all elements directly below the top-level that have the element name NAME.

$xmlobj->children

Called without arguments, children() will return an array of XML::SimpleObject s for all children elements of $xmlobj. These are not in the order they occur in the XML document.

$xmlobj->children_names

This will return an array of all the names of child elements for $xmlobj. You can use this to step through all the children of a given element (see EXAMPLES). Each name will occur only once, even if multiple children exist with that name.

$xmlobj->value

If the element represented by $xmlobj contains any PCDATA, this method will return that text data.

$xmlobj->attribute(NAME)

This returns the text for an attribute NAME of the XML element represented by $xmlobj.

$xmlobj->attributes

This returns a hash of key/value pairs for all elements in element $xmlobj.

XML::SimpleObject 0.53 Screenshot

Advertisements

XML::SimpleObject 0.53 Keywords

Bookmark XML::SimpleObject 0.53

Hyperlink code:
Link for forum:

XML::SimpleObject 0.53 Copyright

WareSeeker periodically updates pricing and software information of XML::SimpleObject 0.53 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 XML::SimpleObject 0.53 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
XML::SimpleObject::LibXML is a Perl extension allowing a simple(r) object representation of an XML::LibXML DOM object. Free Download
XML::Simple::Tree is a tree object extension for XML::Simple data structures. Free Download
XML::Simple is a easy API to maintain XML (esp config files). Free Download
C++ XML Objects is a framework for persisting hierarchies of C++ objects to and from XML. Free Download
XML::Genx::Simple is a slightly simpler wrapper class for genx. Free Download
XML::Simple::DTDReader is a simple XML file reading based on their DTDs. Free Download
XML::PatAct::ToObjects is an action module for creating Perl objects. Free Download
XML Tree Object Model Parser is an easy to use XML parser. Free Download