LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XElement Interface Reference

import"XElement.idl";

Inheritance diagram for XElement:
XNode XInterface

Public Member Functions

string getAttribute ([in] string name)
 
Retrieves an attribute value by name. More...
 
XAttr getAttributeNode ([in] string name)
 
Retrieves an attribute node by name. More...
 
XAttr getAttributeNodeNS ([in] string namespaceURI, [in] string localName)
 
Retrieves an Attr node by local name and namespace URI. More...
 
string getAttributeNS ([in] string namespaceURI, [in] string localName)
 
Retrieves an attribute value by local name and namespace URI. More...
 
XNodeList getElementsByTagName ([in] string name)
 
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. More...
 
XNodeList getElementsByTagNameNS ([in] string namespaceURI, [in] string localName)
 
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. More...
 
string getTagName ()
 
The name of the element. More...
 
boolean hasAttribute ([in] string name)
 
Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise. More...
 
boolean hasAttributeNS ([in] string namespaceURI, [in] string localName)
 
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. More...
 
void removeAttribute ([in] string name) raises (DOMException)
 
Removes an attribute by name. More...
 
XAttr removeAttributeNode ([in] XAttr oldAttr) raises (DOMException)
 
Removes the specified attribute node. More...
 
void removeAttributeNS ([in] string namespaceURI, [in] string localName) raises (DOMException)
 
Removes an attribute by local name and namespace URI. More...
 
void setAttribute ([in] string name, [in] string value) raises (DOMException)
 
Adds a new attribute. More...
 
XAttr setAttributeNode ([in] XAttr newAttr) raises (DOMException)
 
Adds a new attribute node. More...
 
XAttr setAttributeNodeNS ([in] XAttr newAttr) raises (DOMException)
 
Adds a new attribute. More...
 
void setAttributeNS ([in] string namespaceURI, [in] string qualifiedName, [in] string value) raises (DOMException)
 
Adds a new attribute. More...
 
- Public Member Functions inherited from XNode
XNode appendChild ([in] XNode newChild) raises (DOMException)
 
Adds the node newChild to the end of the list of children of this node. More...
 
XNode cloneNode ([in] boolean deep)
 
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes. More...
 
XNamedNodeMap getAttributes ()
 
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise. More...
 
XNodeList getChildNodes ()
 
A NodeList that contains all children of this node. More...
 
XNode getFirstChild ()
 
The first child of this node. More...
 
XNode getLastChild ()
 
The last child of this node. More...
 
string getLocalName ()
 
Returns the local part of the qualified name of this node. More...
 
string getNamespaceURI ()
 
The namespace URI of this node, or null if it is unspecified. More...
 
XNode getNextSibling ()
 
The node immediately following this node. More...
 
string getNodeName ()
 
The name of this node, depending on its type; see the table above. More...
 
NodeType getNodeType ()
 
A code representing the type of the underlying object, as defined above. More...
 
string getNodeValue () raises (DOMException)
 
The value of this node, depending on its type; see the table above. More...
 
XDocument getOwnerDocument ()
 
The Document object associated with this node. More...
 
XNode getParentNode ()
 
The parent of this node. More...
 
string getPrefix ()
 
The namespace prefix of this node, or null if it is unspecified. More...
 
XNode getPreviousSibling ()
 
The node immediately preceding this node. More...
 
boolean hasAttributes ()
 
Returns whether this node (if it is an element) has any attributes. More...
 
boolean hasChildNodes ()
 
Returns whether this node has any children. More...
 
XNode insertBefore ([in] XNode newChild, [in] XNode refChild) raises (DOMException)
 
Inserts the node newChild before the existing child node refChild. More...
 
boolean isSupported ([in] string feature, [in] string ver)
 
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node. More...
 
void normalize ()
 
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes. More...
 
XNode removeChild ([in] XNode oldChild) raises (DOMException)
 
Removes the child node indicated by oldChild from the list of children, and returns it. More...
 
XNode replaceChild ([in] XNode newChild, [in] XNode oldChild) raises (DOMException)
 
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. More...
 
void setNodeValue ([in] string nodeValue) raises (DOMException)
 
The value of this node, depending on its type; see the table above. More...
 
void setPrefix ([in] string prefix) raises (DOMException)
 
The namespace prefix of this node, or null if it is unspecified. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Member Function Documentation

◆ getAttribute()

string getAttribute ( [in] string  name)


Retrieves an attribute value by name.

◆ getAttributeNode()

XAttr getAttributeNode ( [in] string  name)


Retrieves an attribute node by name.

◆ getAttributeNodeNS()

XAttr getAttributeNodeNS ( [in] string  namespaceURI,
[in] string  localName 
)


Retrieves an Attr node by local name and namespace URI.

◆ getAttributeNS()

string getAttributeNS ( [in] string  namespaceURI,
[in] string  localName 
)


Retrieves an attribute value by local name and namespace URI.

◆ getElementsByTagName()

XNodeList getElementsByTagName ( [in] string  name)


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 
)


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


The name of the element.

◆ hasAttribute()

boolean hasAttribute ( [in] string  name)


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 
)


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
)


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
)


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
)


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
)


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
)


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
)


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
)


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.


The documentation for this interface was generated from the following file: