Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.13

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: xml :: dom ::

interface XDocument
Base Interfaces
XDocumentXNode

XNode
(referenced interface's summary:)
The primary dom datatype

Methods' Summary
createAttribute Creates an Attr of the given name. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.  
createAttributeNS Creates an attribute of the given qualified name and namespace URI. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, 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, or its prefix, is "xmlns" and the namespaceURI is different from " http://www.w3.org/2000/xmlns/". NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.  
createCDATASection Creates a CDATASection node whose value is the specified string. Throws: DOMException - NOT_SUPPORTED_ERR: Raised if this document is an HTML document.  
createComment Creates a Comment node given the specified string.  
createDocumentFragment Creates an empty DocumentFragment object.  
createElement Creates an element of the type specified. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.  
createElementNS Creates an element of the given qualified name and namespace URI. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace" . NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.  
createEntityReference Throws: DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported. Creates an EntityReference object. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. NOT_SUPPORTED_ERR: Raised if this document is an HTML document.  
createProcessingInstruction Creates a ProcessingInstruction node given the specified name and data strings. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character. NOT_SUPPORTED_ERR: Raised if this document is an HTML document.  
createTextNode Creates a Text node given the specified string.  
getDoctype The Document Type Declaration (see DocumentType) associated with this document.  
getDocumentElement This is a convenience attribute that allows direct access to the child node that is the root element of the document.  
getElementById Returns the Element whose ID is given by elementId.  
getElementsByTagName 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.  
getElementsByTagNameNS Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree.  
getImplementation The DOMImplementation object that handles this document.  
importNode Imports a node from another document to this document. Throws: DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported.  
Methods' Details
createAttribute
XAttr
createAttribute( [in] string  name )
raises( DOMException );

Description
Creates an Attr of the given name. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
createAttributeNS
XAttr
createAttributeNS( [in] string  namespaceURI,
[in] string  qualifiedName )
raises( DOMException );

Description
Creates an attribute of the given qualified name and namespace URI. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, 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, or its prefix, is "xmlns" and the namespaceURI is different from " http://www.w3.org/2000/xmlns/". NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.
createCDATASection
XCDATASection
createCDATASection( [in] string  data )
raises( DOMException );

Description
Creates a CDATASection node whose value is the specified string. Throws: DOMException - NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
createComment
XComment
createComment( [in] string  data );

Description
Creates a Comment node given the specified string.
createDocumentFragment
XDocumentFragment
createDocumentFragment();

Description
Creates an empty DocumentFragment object.
createElement
XElement
createElement( [in] string  tagName )
raises( DOMException );

Description
Creates an element of the type specified. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character.
createElementNS
XElement
createElementNS( [in] string  namespaceURI,
[in] string  qualifiedName )
raises( DOMException );

Description
Creates an element of the given qualified name and namespace URI. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . NAMESPACE_ERR: Raised if the qualifiedName is malformed per the Namespaces in XML specification, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from " http://www.w3.org/XML/1998/namespace" . NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.
createEntityReference
XEntityReference
createEntityReference( [in] string  name )
raises( DOMException );

Description
Throws: DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported. Creates an EntityReference object. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
createProcessingInstruction
XProcessingInstruction
createProcessingInstruction( [in] string  target,
[in] string  data )
raises( DOMException );

Description
Creates a ProcessingInstruction node given the specified name and data strings. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character. NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
createTextNode
XText
createTextNode( [in] string  data );

Description
Creates a Text node given the specified string.
getDoctype
XDocumentType
getDoctype();

Description
The Document Type Declaration (see DocumentType) associated with this document.
getDocumentElement
XElement
getDocumentElement();

Description
This is a convenience attribute that allows direct access to the child node that is the root element of the document.
getElementById
XElement
getElementById( [in] string  elementId );

Description
Returns the Element whose ID is given by elementId.
getElementsByTagName
XNodeList
getElementsByTagName( [in] string  tagname );

Description
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.
getElementsByTagNameNS
XNodeList
getElementsByTagNameNS( [in] string  namespaceURI,
[in] string  localName );

Description
Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree.
getImplementation
XDOMImplementation
getImplementation();

Description
The DOMImplementation object that handles this document.
importNode
XNode
importNode( [in] XNode  importedNode,
[in] boolean  deep )
raises( DOMException );

Description
Imports a node from another document to this document. Throws: DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported is not supported.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.