Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: xml :: dom ::
interface XElement
  Base Interfaces
      XElement
      ┗ XNode
  XNode | (referenced interface's summary:) The primary dom datatype

Methods' Summary
getAttribute | Retrieves an attribute value by name.
getAttributeNode | Retrieves an attribute node by name.
getAttributeNodeNS | Retrieves an Attr node by local name and namespace URI.
getAttributeNS | Retrieves an attribute value by local name and namespace URI.
getElementsByTagName | Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are encountered in a preorder traversal of this Element tree.
getElementsByTagNameNS | 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 Element tree.
getTagName | The name of the element.
hasAttribute | Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.
hasAttributeNS | Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.
removeAttribute | Removes an attribute by name. Throws: DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
removeAttributeNode | Removes the specified attribute node. Throws: DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element.
removeAttributeNS | Removes an attribute by local name and namespace URI. Throws: DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
setAttribute | Adds a new attribute. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
setAttributeNode | Adds a new attribute node. Throws: DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
setAttributeNodeNS | Adds a new attribute. Throws: DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.
setAttributeNS | Adds a new attribute. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 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.

Methods' Details
getAttribute
string
getAttribute( | [in] string | name );
Description Retrieves an attribute value by name.
getAttributeNode
XAttr
getAttributeNode( | [in] string | name );
Description Retrieves an attribute node by name.
getAttributeNodeNS
XAttr
getAttributeNodeNS( | [in] string | namespaceURI,
| [in] string | localName );
Description Retrieves an Attr node by local name and namespace URI.
getAttributeNS
string
getAttributeNS( | [in] string | namespaceURI,
| [in] string | localName );
Description Retrieves an attribute value by local name and namespace URI.
getElementsByTagName
XNodeList
getElementsByTagName( | [in] string | name );
Description Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are encountered in a preorder traversal of this Element tree.
getElementsByTagNameNS
XNodeList
getElementsByTagNameNS( | [in] string | namespaceURI,
| [in] string | localName );
Description 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 Element tree.
getTagName
string
getTagName();
Description The name of the element.
hasAttribute
boolean
hasAttribute( | [in] string | name );
Description Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.
hasAttributeNS
boolean
hasAttributeNS( | [in] string | namespaceURI,
| [in] string | localName );
Description Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.
removeAttribute
void
removeAttribute( | [in] string | name )
raises( | DOMException );
Description Removes an attribute by name. Throws: DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
removeAttributeNode
XAttr
removeAttributeNode( | [in] XAttr | oldAttr )
raises( | DOMException );
Description Removes the specified attribute node. Throws: DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. NOT_FOUND_ERR: Raised if oldAttr is not an attribute of the element.
removeAttributeNS
void
removeAttributeNS( | [in] string | namespaceURI,
| [in] string | localName )
raises( | DOMException );
Description Removes an attribute by local name and namespace URI. Throws: DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
setAttribute
void
setAttribute( | [in] string | name,
| [in] string | value )
raises( | DOMException );
Description Adds a new attribute. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified name contains an illegal character. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
setAttributeNode
XAttr
setAttributeNode( | [in] XAttr | newAttr )
raises( | DOMException );
Description Adds a new attribute node. Throws: DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements.
setAttributeNodeNS
XAttr
setAttributeNodeNS( | [in] XAttr | newAttr )
raises( | DOMException );
Description Adds a new attribute. Throws: DOMException - WRONG_DOCUMENT_ERR: Raised if newAttr was created from a different document than the one that created the element. NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an attribute of another Element object. The DOM user must explicitly clone Attr nodes to re-use them in other elements. NOT_SUPPORTED_ERR: Always thrown if the current document does not support the "XML" feature, since namespaces were defined by XML.
setAttributeNS
void
setAttributeNS( | [in] string | namespaceURI,
| [in] string | qualifiedName,
| [in] string | value )
raises( | DOMException );
Description Adds a new attribute. Throws: DOMException - INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character, per the XML 1.0 specification . NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. 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.

Top of Page

Copyright © 2000, 2014 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.