SophiaFramework UNIVERSE 5.3 |
#include <SFXXMLDocumentFragment.hpp>
class SFXXMLDocumentFragment : public SFXXMLNode;
SFMTYPEDEFCLASS(SFXXMLDocumentFragment)
A DocumentFragment node(SFXXMLDocumentFragment) contains a document fragment of the XML document.
SFXXMLNode | SFXXMLAttribute | SFXXMLCDATASection | SFXXMLComment | SFXXMLDocument | SFXXMLDocumentType | SFXXMLElement | SFXXMLEntity | SFXXMLEntityReference | SFXXMLNotation | SFXXMLProcessingInstruction | SFXXMLText
Constructor/Destructor |
---|
SFXXMLDocumentFragment(
SFXXMLDocumentPtr owner
) Constructor of the SFXXMLDocumentFragment class.
|
SFXXMLDocumentFragment(
SFXXMLDocumentFragmentConstRef other
, Bool deep = false
) Constructor of the SFXXMLDocumentFragment class.
|
~SFXXMLDocumentFragment( Void ) Destructor of the SFXXMLDocumentFragment class.
|
Public Functions | |
---|---|
SFCError |
AppendChild(
SFXXMLNodeConstPtr newchild
) Append the specified child node at the end.
|
SFCError |
CloneNode(
SFXXMLNodeHandle clonenode
, Bool deep
) Create a copy of this node.
|
DOMNodeListPtr |
GetChildNodes( Void ) Get all the child nodes.
|
SFXXMLNodePtr |
GetFirstChild( Void ) Get the first child node.
|
SFXXMLNodePtr |
GetLastChild( Void ) Get the last child node.
|
ACharConstPtr |
GetNodeName( Void ) Get the node name.
|
NodeType |
GetNodeType( Void ) Get the node type.
|
Bool |
HasChildNodes( Void ) Check wheteher or not this node has any child nodes.
|
SFCError |
InsertBefore(
SFXXMLNodeConstPtr newchild
, SFXXMLNodeConstPtr refchild
) Insert the specified node.
|
SFCError |
RemoveChild(
SFXXMLNodeConstPtr oldchild
) Remove the specified child node including its descendant nodes.
|
SFCError |
ReplaceChild(
SFXXMLNodeConstPtr newchild
, SFXXMLNodeConstPtr oldchild
) Replace the specified child node.
|
Bool |
EqualNode(
SFXXMLNodeConstPtr arg
)
(inherits from SFXXMLNode)
Check whether this node equals the specified node or not.
|
SFXXMLNodePtr |
GetNextSibling( Void )
(inherits from SFXXMLNode)
Get the next sibling node.
|
ACharConstPtr |
GetNodeValue( Void )
(inherits from SFXXMLNode)
Get the node value.
|
SFXXMLNodePtr |
GetParentNode( Void )
(inherits from SFXXMLNode)
Get the parent node.
|
SFXXMLNodePtr |
GetPreviousSibling( Void )
(inherits from SFXXMLNode)
Get the previous sibling node.
|
SFXAnsiString |
GetText( Void )
(inherits from SFXXMLNode)
Get the node text.
|
Bool |
IsSameNode(
SFXXMLNodeConstPtr other
)
(inherits from SFXXMLNode)
Check whether this node is the same as the specified one or not.
|
Void |
SetNodeValue(
ACharConstPtr value
)
(inherits from SFXXMLNode)
Set the node value.
|
SFCError |
SetText(
SFXAnsiStringConstRef text
)
(inherits from SFXXMLNode)
Set the node text.
|
Types |
---|
DOMNamedNodeMap
(inherits from SFXXMLNode)
Class to manage the DOM nodes by name
|
DOMNodeList
(inherits from SFXXMLNode)
Class to manage the DOM nodes by list
|
NodeType
(inherits from SFXXMLNode)
SFXXMLNode::NodeType is an enumeration type of NodeType values defined in the W3C DOM Level 1 Specification.
Document Object Model (DOM) Level 1 Specification )
|
[ public, explicit ] SFXXMLDocumentFragment( SFXXMLDocumentPtr owner // root node of the DOM tree );
[ public, explicit ] SFXXMLDocumentFragment( SFXXMLDocumentFragmentConstRef other // DocumentFragment node Bool deep = false // whether or not to copy child nodes recursively );
[ public, virtual ] virtual ~SFXXMLDocumentFragment(Void);
[ public, virtual ] SFCError AppendChild( SFXXMLNodeConstPtr newchild // child node to append );
The "newchild" node is appended as the last child node to this node without copying it.
If the "newchild" node belongs to a DOM tree, it will be removed from that tree.
[ public, virtual ] SFCError CloneNode( SFXXMLNodeHandle clonenode // target node where to copy this node(Handle type) Bool deep // whether or not to copy the child nodes recursively );
Specify the target node where to copy this node.
If true is set to this argument, copy the child nodes recursively.
Otherwise, copy only this node.
[ public, virtual, const ] DOMNodeListPtr GetChildNodes(Void);
Return the pointer to the SFXXMLNode::DOMNodeList instance that contains all child nodes of this node.
Note | |
---|---|
Each element of SFXXMLNode::DOMNodeList is of the "pointer to the SFXXMLNode" type. |
SFXXMLNode::DOMNodeList | SFXXMLNode::GetChildNodes | SFXXMLNode
[ public, virtual, const ] SFXXMLNodePtr GetFirstChild(Void);
Return the first child node of this node. Return null if this node has no child.
[ public, virtual, const ] SFXXMLNodePtr GetLastChild(Void);
Return the last child node of this node. Return null if this node has no child.
[ public, virtual, const ] ACharConstPtr GetNodeName(Void);
Return the "#document-fragment" string.
[ public, virtual, const ] NodeType GetNodeType(Void);
Return DOCUMENT_FRAGMENT_NODE.
[ public, virtual, const ] Bool HasChildNodes(Void);
[ public, virtual ] SFCError InsertBefore( SFXXMLNodeConstPtr newchild // node to insert SFXXMLNodeConstPtr refchild // newchild node is inserted before refchild node );
Insert the newchild node before the refchild node. If the refchild argument is specified as null, append the newchild node as the last child node.
When the newchild node is the DocumentFragment node, all the child nodes of the newchild node are inserted in the same order before the refchild node.
When the newchild node has already existed in the DOM tree, it is removed before insertion.
[ public, virtual ] SFCError RemoveChild( SFXXMLNodeConstPtr oldchild // child node to remove );
[ public, virtual ] SFCError ReplaceChild( SFXXMLNodeConstPtr newchild // new child node to replace with SFXXMLNodeConstPtr oldchild // old child node to be replaced );
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |