|
|
XML::GDOME::Document - Interface Document implementation.
$docType = $doc->getDoctype(); $elem = $doc->getDocumentElement(); $DOMImpl = $doc->getImplementation(); $attr = $doc->createAttribute($name); $attr = $doc->createAttributeNS($namespaceURI,$qualifiedName); $cdata = $doc->createCDATASection($data); $comment = $doc->createComment($data); $docFrag = $doc->createDocumentFragment(); $elem = $doc->createElement($tagName); $elem = $doc->createElementNS($namespaceURI,$qualifiedName); $entRef = $doc->createEntityReference($name); $pi = $doc->createProcessingInstruction($target,$data); $text = $doc->createTextNode($data); $elem = $doc->getElementById($elementId); $nodeList = $doc->getElementsByTagName($tagname); $nodeList = $doc->getElementsByTagNameNS($namespaceURI,$localName); $node = $doc->importNode($importedNode,$deep); $str = $doc->toString($mode); $str = $doc->toStringEnc($encoding,$mode);
the XML::GDOME::Node manpage > XML::GDOME::Document
gdome_doc_createAttributeNS()
method.
name
: The name of the attribute
Returns: a new Attr object with the nodeName attribute set to name, and localName, prefix, and namespaceURI set to undef. The value of the attribute is the empty string.
namespaceURI
: The namespace URI of the attribute to create
qualifiedName
: The qualified name of the attribute to create
Returns: a new Attr object with the following attributes: %Node.nodeName = qualifiedName, %Node.namespaceURI = namespaceURI, %Node.prefix = prefix, extracted from qualifiedName, %Node.localName = localName, extracted from qualifiedName, %Attr.name = qualifiedName, %Node.nodeValue = the empty string.
GDOME_NAMESPACE_ERR
: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is %NUKK, if the qualifiedName has a prefix that is ``xml'' and the namespaceURI is different from ``http://www.w3.org/XML/1998/namespace'', or if the qualifiedName is ``xmlns'' and the namespaceURI is different from ``http://www.w3.org/2000/xmlns/''.
data
: The data for the CDATASection contents
Returns: the new CDATASection object.
data
: The data for the comment contents
Returns: the new Comment object.
Returns: the new DocumentFragment object.
gdome_doc_createElementNS()
function.
tagName
: The name of the element type to instantiate.
Returns: a new Element object with the nodeName attribute set to tagName, and localName, prefix, and namespaceURI set to undef.
namespaceURI
: The namespace URI of the element to create
qualifiedName
: The qualified name of the element to create
Returns: a new Element object with the following attributes: %Node.nodeName = qualifiedName, %Node.namespaceURI = namespaceURI, %Node.prefix = prefix, extracted from qualifiedName, %Node.localName = localName, extracted from qualifiedName, %Element.tagName = qualifiedName.
GDOME_NAMESPACE_ERR
: Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is undef, or if the qualifiedName has a prefix that is ``xml'' and the namespaceURI is different from ``http://www.w3.org/XML/1998/namespace''.
name
: The name of the entity to reference
Returns: the new EntityReference object.
target
: The target part of the processing instruction
data
: The data for the node
Returns: The new ProcessingInstruction object.
data
: The data for the node
Returns: The new TextNode object.
elementId
: The unique id value for an element
Returns: the Element whose %ID is given by elementId. If no such element exists, returns undef. Behavior is not defined if more than one element has this %ID.
tagName
: The name of the tag to match on. The special value * matches all tags.
Returns: a NodeList of all the elements with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree.
namespaceURI
: The namespace URI of the elements to match on. The special value * matches all namespaces.
localName
: The local name of the elements to match on. The special value * matches all local names.
Returns: a NodeList of all the descendant elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of this Document tree.
importedNode
: The node to import.
deep
: If 1, recursively import the subtree under the specified node; if 0, import only the node itself. This has no effect on Attr, EntityReference, and Notation nodes.
Returns: the imported node that belongs to this Document.
GDOME_NOT_SUPPORTED_ERR
: Raised if the type of node being imported is not supported.
mode
: the indentation mode wanted, either GDOME_SAVE_STANDARD or GDOME_SAVE_LIBXML_INDENT
Returns: string representation of DOM tree
mode
: the indentation mode wanted, either GDOME_SAVE_STANDARD or GDOME_SAVE_LIBXML_INDENT
encoding
: character encoding to use when generating XML text
Returns: string representation of DOM tree using the specified character encoding standard