NAME
XML::DOM2::DOM::Document
DESCRIPTION
Base class for document objects, extends the DOM with document specific methods.
METHODS
$class->createDocumentType( $qualifiedName, $publicId, $systemId, $dtd )
Create a new XML Document Type.
$class->createDocument( $namespaceURI, $qualifiedName, $doctype )
Creates a new XML Document.
$document->documentElement()
Returns the main document as an element! it's no longer a document object.
$document->documentType()
Returns a document type object for this document.
$document->addId( $id, $element )
Adds an id of an element, used internaly.
$document->removeId( $id )
Removes an id of an element, used internaly.
$document->getElementById( $id )
Returns the element with that id in this document.
$document->addElement( $element )
Adds an element to the elements list, used internaly.
$document->removeElement( $element )
Remove the specified element from the elements list, used internaly.
$document->getElements( $type )
$document->getElementsByType( $type )
$document->getElementsByName( $type )
Get all elements of the specified type/tagName; if none is specified, get all elements in document.
$document->getElementNames()
$document->getElementTypes()
Get all the element types in use in the document.
$document->addDefinition( $def )
Add a definition to the document.
$document->definitions( )
Return all definitions in document.
$document->getNamespace( $uri )
Return a namespace based on the uri or prefix.
$document->createNamespace( $prefix, $uri )
Create a new namespace within this document.
$document->addNamespace( $namespace )
Add namespace to this document.
$document->removeNamespace( $namespace )
Remove a namespace from this document.
$document->createElement( $name, %options )
Creates a new element of type name.
$document->createElementNS( $namespace, $name, %options )
Create an element in a namespace.
$document->createTextNode( $data )
Create a textnode element.
$document->createComment( $data )
Create a comment element
$document->createCDATASection( $data )
create a CDATA element.
COPYRIGHT
Martin Owens, doctormo@cpan.org