|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: �CONSTR�|� FUNCTION �|�DATA | DETAIL: �CONSTR�|� FUNCTION �|�DATA |
class INode { public: enum { ELEMENT_NODE = 1, ATTRIBUTE_NODE = 2, TEXT_NODE = 3, CDATA_SECTION_NODE = 4, ENTITY_REFERENCE_NODE = 5, ENTITY_NODE = 6, PROCESSING_INSTRUCTION_NODE = 7, COMMENT_NODE = 8, DOCUMENT_NODE = 9, DOCUMENT_TYPE_NODE = 10, DOCUMENT_FRAGMENT_NODE = 11, NOTATION_NODE = 12, NAMESPACE_NODE = 13 }; public: const WCHAR *GetNodeName(); const WCHAR *GetNodeValue(); void SetNodeValue(const WCHAR *pszValue); int GetNodeType(); XNode GetParentNode(); XNodeList GetChildNodes(); XNode GetFirstChild(); XNode GetLastChild(); XNode GetPreviousSibling(); XNode GetNextSibling(); XNamedNodeMap GetAttributes(); XDocument GetOwnerDocument(); XNamedNodeMap GetNamespaces(); public: XNode InsertBefore(INode *pNewChild, INode *pRefChild); XNode ReplaceChild(INode *pNewChild, INode *pOldChild); XNode RemoveChild(INode *pOldChild); XNode AppendChild(INode *pNewChild); bool HasChildNodes(); XNode CloneNode(bool bDeep); const WCHAR *GetNamespaceUri(); const WCHAR *GetLocalName(); int GetDocumentId(); int GetNodeId(); CString GetStringValue(); }; typedef XRefCnt<INode> XNode;
The single node in the document tree.
This class implements, with several extensions,
the C++ binding for the
Node
interface
specified by DOM.
INodeList, INamedNodeMap, IDocument
Function Summary | |
const�WCHAR�*
|
GetNodeName
();
����������Returns the name of this node. |
const�WCHAR�*
|
GetNodeValue
();
����������Returns the value of this node. |
void
|
SetNodeValue
(const WCHAR *pszValue);
����������Sets the new value of this node. |
int
|
GetNodeType
();
����������Returns the type of this node. |
XNode
|
GetParentNode
();
����������Returns the parent node of this node. |
XNodeList
|
GetChildNodes
();
����������Returns the list of child nodes of this node. |
XNode
|
GetFirstChild
();
����������Returns the first child node of this node. |
XNode
|
GetLastChild
();
����������Returns the last child node of this node. |
XNode
|
GetPreviousSibling
();
����������Returns the previous sibling node of this node. |
XNode
|
GetNextSibling
();
����������Returns the next sibling node of this node. |
XNamedNodeMap
|
GetAttributes
();
����������Returns the attribute map of this node. |
XDocument
|
GetOwnerDocument
();
����������Returns the owner document node of this node. |
XNamedNodeMap
|
GetNamespaces
();
����������Returns the namespace map of this node |
XNode
|
InsertBefore
(INode *pNewChild, INode *pRefChild);
����������Inserts the node specified by pNewChild
before the
node specified by
pRefChild
into the children list
of this node. |
XNode
|
ReplaceChild
(INode *pNewChild, INode *pOldChild);
����������Replaces the node specified by pOldChild
with the
node specified by
pNewChild
in the children list
of this node. |
XNode
|
RemoveChild
(INode *pOldChild);
����������Removes the node specified by pOldChild
from
the children list of this node. |
XNode
|
AppendChild
(INode *pNewChild);
����������Appends the node specified by pNewChild
to
the end of children list of this node. |
bool
|
HasChildNodes
();
����������Tests whether this node has children nodes. |
XNode
|
CloneNode
(bool bDeep);
����������Creates a copy of this node. |
const�WCHAR�*
|
GetNamespaceUri
();
����������Returns the namespace URI of this node. |
const�WCHAR�*
|
GetLocalName
();
����������Returns the local name of this node. |
int
|
GetDocumentId
();
����������Returns the unique identifier of the document owning this node. |
int
|
GetNodeId
();
����������Returns the unique identifier of this node within a document. |
CString
|
GetStringValue
();
����������Returns the string value of this node, as defined by XPath. |
Function Detail |
const WCHAR *GetNodeName();
Returns the name of this node.
This method implements the C++ binding
for the
nodeName
attribute specified by DOM.
const WCHAR *GetNodeValue();
Returns the value of this node.
This method implements the C++ binding
for the
nodeValue
attribute specified by DOM.
void SetNodeValue(const WCHAR *pszValue);
Sets the new value of this node.
This method implements the C++ binding
for the
nodeValue
attribute specified by DOM.
This method is not supported by XDM.
pszValue
- the new value for this nodeint GetNodeType();
Returns the type of this node.
This method implements the C++ binding
for the
nodeType
attribute specified by DOM.
XNode GetParentNode();
Returns the parent node of this node.
This method implements the
C++ binding for the
parentNode
attribute specified by DOM.
If the document model is DOM, and this node is an attribute,
this method returns
NULL
.
If the document model is XDM, and this node is an
attribute or a namespace, this method returns the owner element node.
This behavior is different from
that specified by DOM, which requires the
parentNode
to be null for attribute nodes.
NULL
if this node has no parentXNodeList GetChildNodes();
Returns the list of child nodes of this node.
This method implements the
C++ binding for the
childNodes
attribute specified by DOM.
Attribute and namespace nodes are not treated as children of their owner element nodes.
This method is not supported by XDM.
XNode GetFirstChild();
Returns the first child node of this node.
This method implements the
C++ binding for the
firstChild
attribute specified by DOM.
NULL
if this node has no childrenXNode GetLastChild();
Returns the last child node of this node.
This method implements the
C++ binding for the
lastChild
attribute
specified by DOM.
NULL
if this node has no childrenXNode GetPreviousSibling();
Returns the previous sibling node of this node.
This method implements the C++ binding for
the
previousSibling
attribute specified by DOM.
NULL
if this node has no previous siblingXNode GetNextSibling();
Returns the next sibling node of this node.
This method implements the C++ binding for
the
nextSibling
attribute specified by DOM.
NULL
if this node has no next siblingXNamedNodeMap GetAttributes();
Returns the attribute map of this node.
This method implements the C++ binding for
attributes
attribute specified by DOM.
If the node supports XDM, then namespace
attributes (i.e., those having names started
with
"xmlns"
") are not included in the
attribute map.
NULL
if this node does not represent an elementXDocument GetOwnerDocument();
Returns the owner document node of this node.
This method implements the C++ binding for
parentNode
attribute specified by DOM.
XNamedNodeMap GetNamespaces();
Returns the namespace map of this node
This is an extension having no equivalent in DOM.
This method is not supported by DOM.
NULL
if this node does not represent an elementXNode InsertBefore(INode *pNewChild, INode *pRefChild);
Inserts the node specified by
pNewChild
before the
node specified by
pRefChild
into the children list
of this node.
This method implements the C++ binding for
the
insertBefore
operation specified by DOM.
This method is not supported by XDM.
pNewChild
- the node to be insertedpRefChild
- the child node before which
the new node must be inserted, or
NULL
if the
new node must be appended to the end of the children listpNewChild
)XNode ReplaceChild(INode *pNewChild, INode *pOldChild);
Replaces the node specified by
pOldChild
with the
node specified by
pNewChild
in the children list
of this node.
This method implements the C++ binding for
the
replaceChild
operation specified by DOM.
This method is not supported by XDM.
pNewChild
- the replacing nodepOldChild
- the node to replacepOldChild
)XNode RemoveChild(INode *pOldChild);
Removes the node specified by
pOldChild
from
the children list of this node.
This method implements the C++ binding for
removeChild
operation specified by DOM.
This method is not supported by XDM.
pOldChild
- the node to removepOldChild
)XNode AppendChild(INode *pNewChild);
Appends the node specified by
pNewChild
to
the end of children list of this node.
This method implements the C++ binding for
the
appendChild
operation specified by DOM.
This method is not supported by XDM.
pNewChild
- the node to appendpNewChild
)bool HasChildNodes();
Tests whether this node has children nodes.
This method implements the C++ binding for
the
hasChildren
operation specified by DOM.
true
if this node has children nodes;
false
otherwiseXNode CloneNode(bool bDeep);
Creates a copy of this node.
This method implements the C++ binding for
the
cloneNode
operation specified by DOM.
This method is not supported by XDM.
bDeep
- when
true
, this node is cloned together
with all descendant nodes;
when
false
, only this node is clonedconst WCHAR *GetNamespaceUri();
Returns the namespace URI of this node.
This is an extension XDM method that has no equivalent in
DOM Level 1 and has very different semantics then the
namespaceURI
attribute defined by DOM Level 2.
This method is not supported by DOM.
const WCHAR *GetLocalName();
Returns the local name of this node.
This is an extension XDM method that has no equivalent in DOM Level 1.
This method is not supported by DOM.
int GetDocumentId();
Returns the unique identifier of the document owning this node.
The document identifier is an integer that is unique for
each instance of
IDocument
class.
This is an extension XDM method that has no equivalent in DOM.
This method is not supported by DOM.
int GetNodeId();
Returns the unique identifier of this node within a document.
The node identifier is an integer that is unique for each node within any single document. Node identifiers are not globally unique: nodes owned by different documents may have the same values of node identifiers.
Within each document, identifiers are assigned to nodes in order of their creation; nodes created first receive smaller identifiers.
This is an extension XDM method that has no equivalent in DOM.
This method is not supported by DOM.
CString GetStringValue();
Returns the string value of this node, as defined by XPath.
This is an extension XDM method that has no equivalent in DOM.
This method is not supported by DOM.
|
Unicorn XML Toolkit Version 1.50.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: �CONSTR�|� FUNCTION �|�DATA | DETAIL: �CONSTR�|� FUNCTION �|�DATA |