XML::Xerces::BagOfTricksXML::Xerces::BagOfTricks is a Perl library to make XML:Xerces easier and more perl-ish. | |
Download |
XML::Xerces::BagOfTricks Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Aaron Trevena
- Publisher web site:
- http://search.cpan.org/~teejay/XML-Xerces-BagOfTricks-0.03/lib/XML/Xerces/BagOfTricks.pm
XML::Xerces::BagOfTricks Tags
XML::Xerces::BagOfTricks Description
XML::Xerces::BagOfTricks is a Perl library to make XML:Xerces easier and more perl-ish. XML::Xerces::BagOfTricks is a Perl library to make XML:Xerces easier and more perl-ish.SYNOPSIS use XML::Xerces::BagOfTricks qw(:all); # get a nice (empty) DOM Document my $DOMDocument = getDocument($namespace,$root_tag); # get a DOM Document from an XML file my $DOMDocument = getDocumentFromXML (file=>$file); # get a DOM Document from an XML file my $DOMDocument = getDocumentFromXML(xml=>$xml); # get a nice Element containing a text node (i.e. bar) my $foo_elem = getTextElement($DOMDocument,'Foo','Bar'); # get a nice element with attributes (i.e '') my $foo_elem = getElement($DOMDocument,'Foo','isBar'=>0, 'isFoo'=>1); # get a nice element with attributes that contains a text node my $foo_elem = getElementwithText($DOMDocument,'Foo','Bar',isFoo=>1,isBar=>0); # (i.e. Bar) # if node is not of type Element then append its data to $contents # based on examples in article by P T Darugar. if ( $NodeType ne 'Element' ) { $contents .= $node->getData(); } # or the easier.. my $content = getTextContents($node); # get the nice DOM Document as XML my $xml = getXML($DOMDocument); Requirements: · Perl
XML::Xerces::BagOfTricks Related Software