XML::DOM2 - DOM controlled, strict XML module for extentable xml objects.
Version 0.03, 12 July, 2006
XML::DOM2 is yet _another_ perl XML module.
Features:
* DOM Level2 Compilence in both document, elements and attributes * NameSpace control for elements and attributes * XPath (it's just one small method once you have a good DOM) * Extendability: * Document, Element or Attribute classes can be used as base class for other kinds of document, element or attribute. * Element and Attribute Handler allows element specific child elements and attribute objects. * Element and Attribute serialisation overiding. * Parsing with SAX (use XML::SAX::PurePerl for low dependancy installs) * Internal serialisation
$xml = XML::DOM2->new( -file = [xmlfilename], -data = [xmldata], %options );
Create a new xml object, it will parse a file or data if required or will await creation of nodes.
Parse existing xml data into a document.
$string = $xml->xmlify(%attributes);
Returns xml representation of xml document.
$extention = $xml->extention;
Does not work, legacy option maybe enabled in later versions.
namespace - Default document name space name - Document localName doctype - Document Type object version - XML Version encoding - XML Encoding standalone - XML Standalone
$xml->_serialise_doctype( seperator => "\n" );
Returns the document type in an xml header form.
$xml->_serialise_extention( seperator => "\n" );
Returns the document extentions.
$xml->_serialise_header( );
The XML header, with version, encoding and standalone options.
$xml->_element_handle( $type, %element-options );
Returns an XML element based on $type, use to extentd element capabilties.
$xml->_document_name;
Returns the doctype name or 'xml' as default, can be extended.
$xml->_credit_comment;
Returns the comment credit used in the output
Martin Owens, doctormo@cpan.org
Based on SVG.pm by Ronan Oger, ronan@roasp.com
perl(1),XML::DOM2,XML::DOM2::Parser http://www.w3c.org/Graphics/SVG/ SVG at the W3C
To install XML::DOM2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::DOM2
CPAN shell
perl -MCPAN -e shell install XML::DOM2
For more information on module installation, please visit the detailed CPAN module installation guide.