GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  XML::DOM2 (3)

.ds Aq ’

NAME



  XML::DOM2 - DOM controlled, strict XML module for extentable xml objects.



CONTENTS

VERSION

Version 0.06 - 2007-11-28

SYNOPSIS



  my $xml = XML::DOM2->new( file => filename.xml );
  my $xml = XML::DOM2->new( data => <xml>data</xml> );
  my $xml = XML::DOM2->new( fh   => $file_handle );

  $xml->getChildren();



DESCRIPTION



  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 (its 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



METHODS

CW$class->new( file|data|fh )



  Create a new xml object, it will parse a file, data or a file handle if required or will await creation of nodes.



CW$object->parseDocument( CW%p )



  Parse existing xml data into a document, inputs taken from ->new;



CW$object->xmlify( CW%options ) =head2 CW$object->render( CW%options ) =head2 CW$object->to_xml( CW%options ) =head2 CW$object->serialise( CW%options ) =head2 CW$object->serialize( CW%options )



  Returns xml representation of xml document.

  Options:
        seperator - default is carage return



CI$class->adaptation( CW$name, CW$structure )



  Convert a perl structure and create a new xml document of it:

        $class->adaptation(xml, { foo => [ A, B, C ], bar => D, kou => { A => 1, B => 2 } });

  Will convert to:

        "<xml><foo>A</foo><foo>B</foo><foo>C</foo><bar>D</bar><kou><A>1</A><B>2</B></xml>"

        $class->adaptation(xml, { foo => [ { + => A, _Letter => 1 }, { + => B, _Letter => 2 } ] });

        Will convert to:

        "<xml><foo Letter="1">A</foo><foo Letter="2">B</foo></xml>"



CW$object->extension()



  $extention = $xml->extention();

  Does not work, legacy option maybe enabled in later versions.



OPTIONS

CW$object->namespace( CW$set )



  Default document name space



CW$object->name( CW$set )



  Document localName



CW$object->doctype()



  Document Type object



CW$object->version()



  XML Version



CW$object->encoding()



  XML Encoding



CW$object->standalone()



 XML Standalone



INTERNAL METHODS

    _serialise_doctype

$xml->_serialise_doctype( seperator => \n );

Returns the document type in an xml header form.

    _serialise_extention

$xml->_serialise_extention( seperator => \n );

Returns the document extentions.

    _serialise_header

$xml->_serialise_header( );

The XML header, with version, encoding and standalone options.

    _element_handle

$xml->_element_handle( $type, %element-options );

Returns an XML element based on $type, use to extentd element capabilties.

CW$object->_option( CW$name[, CW$data] )



  Set or get the required option.



CW$object->_can_contain_element()



  Does this node support element children.



CW$object->_document_name()



  Returns the doctype name or xml as default, can be extended.



CW$object->_credit_comment()



  Returns the comment credit used in the output



COPYRIGHT

Martin Owens, doctormo@cpan.org

CREDITS

Based on SVG.pm by Ronan Oger, ronan@roasp.com

SEE ALSO

perl(1),XML::DOM2,XML::DOM2::Parser
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 XML::DOM2 (3) 2007-11-29

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.