|
|
|
|
|
|
Modules Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages
acdk::xml::libxmldom::LibXMLNode Class Reference#include <LibXMLNode.h>
Inheritance diagram for acdk::xml::libxmldom::LibXMLNode:
List of all members.
|
Public Member Functions |
| LibXMLNode (xmlNodePtr np, FreeXmlNodePtrFuncPtr freeFuncPtr=0) |
| ~LibXMLNode () |
RString | getNodeName () |
| The name of this node, depending on its type; see the table above.
|
RString | getNamespaceURI () |
| The namespace URI of this node, or null if it is unspecified (see ).
|
RString | getLocalName () |
| Returns the local part of the qualified name of this node.
|
RString | getBaseURI () |
| The absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI.
|
RString | getPrefix () |
| The namespace prefix of this node, or null if it is unspecified.
|
void | setPrefix (IN(RString) prefix) throw ( org::w3c::dom::RDOMException ) |
RString | getNodeValue () throw ( org::w3c::dom::RDOMException ) |
| The value of this node, depending on its type; see the table above.
|
void | setNodeValue (IN(RString) nodeValue) throw ( org::w3c::dom::RDOMException ) |
short | getNodeType () |
| A code representing the type of the underlying object, as defined above.
|
org::w3c::dom::RNode | getParentNode () |
| The parent of this node.
|
org::w3c::dom::RNodeList | getChildNodes () |
| A NodeList that contains all children of this node.
|
org::w3c::dom::RNode | getFirstChild () |
| The first child of this node.
|
org::w3c::dom::RNode | getLastChild () |
| The last child of this node.
|
org::w3c::dom::RNode | getPreviousSibling () |
| The node immediately preceding this node.
|
org::w3c::dom::RNode | getNextSibling () |
| The node immediately following this node.
|
org::w3c::dom::RNamedNodeMap | getAttributes () |
| A NamedNodeMap containing the attributes of this node (if it is an Element ) or null otherwise.
|
org::w3c::dom::RDocument | getOwnerDocument () |
| The Document object associated with this node.
|
org::w3c::dom::RNode | insertBefore (IN(org::w3c::dom::RNode) newChild, IN(org::w3c::dom::RNode) refChild) throw ( org::w3c::dom::RDOMException ) |
org::w3c::dom::RNode | replaceChild (IN(org::w3c::dom::RNode) newChild, IN(org::w3c::dom::RNode) oldChild) throw ( org::w3c::dom::RDOMException ) |
org::w3c::dom::RNode | removeChild (IN(org::w3c::dom::RNode) oldChild) throw ( org::w3c::dom::RDOMException ) |
org::w3c::dom::RNode | appendChild (IN(org::w3c::dom::RNode) newChild) throw ( org::w3c::dom::RDOMException ) |
bool | hasChildNodes () |
| Returns whether this node has any children.
|
org::w3c::dom::RNode | cloneNode (bool deep) |
| Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
|
void | normalize () |
bool | isSupported (IN(RString) feature, IN(RString) version) |
bool | hasAttributes () |
RString | lookupPrefix (IN(RString) namespaceURI) |
bool | isDefaultNamespace (IN(RString) namespaceURI) |
RString | lookupNamespaceURI (IN(RString) prefix) |
virtual bool | isEqualNode (IN(org::w3c::dom::RNode) arg) |
acdk::lang::Object | getUserData (IN(RString) key) |
| java 1.5 acdk::lang::Object setUserData(IN(RString) key, IN(RObject) data, IN(RUserDataHandler) handler) {
|
RString | getTextContent () throw ( org::w3c::dom::RDOMException ) |
| This attribute returns the text content of this node and its descendants.
|
void | setTextContent (IN(RString) textContent) throw ( org::w3c::dom::RDOMException ) |
RString | toString () |
| return a string representation of this object Object::toString() return getName() by default
|
virtual org::w3c::dom::RNode | selectNode (IN(RString) xpath) |
virtual org::w3c::dom::RNodeList | selectNodes (IN(RString) xpath) |
acdk::lang::RString | selectText (IN(acdk::lang::RString) xpath) |
| select a string.
|
acdk::lang::RObject | selectObject (IN(acdk::lang::RString) xpath) |
| may return Node, NodeList, String Boolean or Number
|
acdk::lang::RBoolean | selectBoolean (IN(acdk::lang::RString) xpath) |
xmlNodePtr | getNodePtr () |
virtual int | getChildCount () |
| dom4j like extension return the number of child nodes
|
void | _unshare (FreeXmlNodePtrFuncPtr freeFuncPtr) |
RString | toXML () |
| dom4j like extension
|
void | write (IN(acdk::io::RWriter) out, int writeFlags=org::w3c::dom::NWFWDefaultFlags, int indentLevel=0, IN(RString) encoding=Nil) |
Static Public Member Functions |
RLibXMLNode | newInstance (xmlDocPtr docPtr, xmlNodePtr nodePtr, int nodeType, bool ownsPtr=false) |
RLibXMLNode | newInstance (xmlNodePtr nodePtr, bool ownsPtr=false) |
Static Protected Member Functions |
int | _mapLibXMLTypeToDomType (int tp) |
int | _mapDomTypeToLibXMLType (int tp) |
Protected Attributes |
XmlNodePtrHolder | _nodePtr |
Constructor & Destructor Documentation
Member Function Documentation
int acdk::xml::libxmldom::LibXMLNode::_mapDomTypeToLibXMLType |
( |
int |
tp |
) |
[static, protected] |
|
int acdk::xml::libxmldom::LibXMLNode::_mapLibXMLTypeToDomType |
( |
int |
tp |
) |
[static, protected] |
|
|
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
The duplicate node has no parent ( parentNode is null ) and no user data. User data associated to the imported node is not carried over. However, if any UserDataHandlers has been specified along with the associated data these handlers will be called with the appropriate parameters before this method returns.
Cloning an Element copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any children it contains unless it is a deep clone. This includes text contained in an the Element since the text is contained in a child Text node. Cloning an Attr directly, as opposed to be cloned as part of an Element cloning operation, returns a specified attribute (specified is true ). Cloning an Attr always clones its children, since they represent its value, no matter whether this is a deep clone or not. Cloning an EntityReference automatically constructs its subtree if a corresponding Entity is available, no matter whether this is a deep clone or not. Cloning any other type of node simply returns a copy of this node.
Note that cloning an immutable subtree results in a mutable copy, but the children of an EntityReference clone are readonly . In addition, clones of unspecified Attr nodes are specified. And, cloning Document , DocumentType , Entity , and Notation nodes is implementation dependent. - Parameters:
-
deep | If true , recursively clone the subtree under the specified node; if false , clone only the node itself (and its attributes, if it is an Element ). |
- Returns:
- The duplicate node.
Implements org::w3c::dom::Node. |
RString acdk::xml::libxmldom::LibXMLNode::getBaseURI |
( |
|
) |
[virtual] |
|
|
The absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI.
This value is computed as described in . However, when the Document supports the feature HTML [DOM Level 2 HTML] , the base URI is computed using first the value of the href attribute of the HTML BASE element if any, and the value of the documentURI attribute from the Document interface otherwise. - Since:
- DOM Level 3
Implements org::w3c::dom::Node. |
virtual int acdk::xml::libxmldom::LibXMLNode::getChildCount |
( |
|
) |
[virtual] |
|
|
The first child of this node.
If there is no such node, this returns null .
Implements org::w3c::dom::Node. |
|
The last child of this node.
If there is no such node, this returns null .
Implements org::w3c::dom::Node. |
RString acdk::xml::libxmldom::LibXMLNode::getLocalName |
( |
|
) |
[virtual] |
|
|
Returns the local part of the qualified name of this node.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement() , this is always null . - Since:
- DOM Level 2
Implements org::w3c::dom::Node. |
RString acdk::xml::libxmldom::LibXMLNode::getNamespaceURI |
( |
|
) |
[virtual] |
|
|
The namespace URI of this node, or null if it is unspecified (see ).
This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement() , this is always null . <p >Note: Per the Namespaces in XML Specification [XML Namespaces] an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace. - Since:
- DOM Level 2
Implements org::w3c::dom::Node. |
|
The node immediately following this node.
If there is no such node, this returns null .
Implements org::w3c::dom::Node. |
RString acdk::xml::libxmldom::LibXMLNode::getNodeName |
( |
|
) |
[virtual] |
|
|
The name of this node, depending on its type; see the table above.
Implements org::w3c::dom::Node. |
xmlNodePtr acdk::xml::libxmldom::LibXMLNode::getNodePtr |
( |
|
) |
[inline] |
|
short acdk::xml::libxmldom::LibXMLNode::getNodeType |
( |
|
) |
[virtual] |
|
|
A code representing the type of the underlying object, as defined above.
Implements org::w3c::dom::Node. |
|
The value of this node, depending on its type; see the table above.
When it is defined to be null , setting it has no effect, including if the node is read-only. - Exceptions:
-
DOMException | DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform. |
Implements org::w3c::dom::Node. |
RString acdk::xml::libxmldom::LibXMLNode::getPrefix |
( |
|
) |
[virtual] |
|
|
The namespace prefix of this node, or null if it is unspecified.
When it is defined to be null , setting it has no effect, including if the node is read-only.
Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
Setting the prefix to null makes it unspecified, setting it to an empty string is implementation dependent.
Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null . - Since:
- DOM Level 2
Implements org::w3c::dom::Node. |
|
The node immediately preceding this node.
If there is no such node, this returns null .
Implements org::w3c::dom::Node. |
|
This attribute returns the text content of this node and its descendants.
When it is defined to be null , setting it has no effect. On setting, any possible children this node may have are removed and, if it the new string is not empty or null , replaced by a single Text node containing the string this attribute is set to.
On getting, no serialization is performed, the returned string does not contain any markup. No whitespace normalization is performed and the returned string does not contain the white spaces in element content (see the attribute Text.isElementContentWhitespace ). Similarly, on setting, no parsing is performed either, the input string is taken as pure textual content.
The string returned is made of the text content of this node depending on its type, as defined below:
Node type | Content |
ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, DOCUMENT_FRAGMENT_NODE | concatenation of the textContent attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the node has no children. |
TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE | nodeValue |
DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE | null |
- Exceptions:
-
DOMException | DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a DOMString variable on the implementation platform. |
- Since:
- DOM Level 3
Reimplemented from org::w3c::dom::Node. |
bool acdk::xml::libxmldom::LibXMLNode::hasAttributes |
( |
|
) |
|
|
bool acdk::xml::libxmldom::LibXMLNode::hasChildNodes |
( |
|
) |
[virtual] |
|
|
Returns whether this node has any children.
- Returns:
- Returns
true if this node has any children, false otherwise.
Implements org::w3c::dom::Node. |
bool acdk::xml::libxmldom::LibXMLNode::isDefaultNamespace |
( |
IN(RString) |
namespaceURI |
) |
|
|
virtual bool acdk::xml::libxmldom::LibXMLNode::isEqualNode |
( |
IN(org::w3c::dom::RNode) |
arg |
) |
[virtual] |
|
bool acdk::xml::libxmldom::LibXMLNode::isSupported |
( |
IN(RString) |
feature, |
|
|
IN(RString) |
version |
|
) |
|
|
RString acdk::xml::libxmldom::LibXMLNode::lookupNamespaceURI |
( |
IN(RString) |
prefix |
) |
|
|
RString acdk::xml::libxmldom::LibXMLNode::lookupPrefix |
( |
IN(RString) |
namespaceURI |
) |
|
|
RLibXMLNode acdk::xml::libxmldom::LibXMLNode::newInstance |
( |
xmlNodePtr |
nodePtr, |
|
|
bool |
ownsPtr = false |
|
) |
[static] |
|
void acdk::xml::libxmldom::LibXMLNode::normalize |
( |
|
) |
|
|
|
select a string.
XPath has to select a text node, comment or attribute
Reimplemented from org::w3c::dom::Node. |
RString acdk::xml::libxmldom::LibXMLNode::toString |
( |
|
) |
[inline, virtual] |
|
RString acdk::xml::libxmldom::LibXMLNode::toXML |
( |
|
) |
[virtual] |
|
void acdk::xml::libxmldom::LibXMLNode::write |
( |
IN(acdk::io::RWriter) |
out, |
|
|
int |
writeFlags = org::w3c::dom::NWFWDefaultFlags, |
|
|
int |
indentLevel = 0, |
|
|
IN(RString) |
encoding = Nil |
|
) |
|
|
Member Data Documentation
|
|