PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXXMLEntityReference
[XML] Class which represents an EntityReference node.
#include <SFXXMLEntityReference.hpp>
class SFXXMLEntityReference : public SFXXMLNode;
SFMTYPEDEFCLASS(SFXXMLEntityReference)

Inheritance diagram

 Inheritance diagram of SFXXMLEntityReferenceClass

Collaboration diagram

 Collaboration diagram of SFXXMLEntityReferenceClass

Description

An EntityReference node (SFXXMLEntityReference) contains an entity reference of the XML document.

Reference

SFXXMLNode | SFXXMLAttribute | SFXXMLCDATASection | SFXXMLComment | SFXXMLDocument | SFXXMLDocumentFragment | SFXXMLDocumentType | SFXXMLElement | SFXXMLEntity | SFXXMLNotation | SFXXMLProcessingInstruction | SFXXMLText

Member

Constructor/Destructor
SFXXMLEntityReference( SFXXMLDocumentPtr owner , SFXAnsiStringConstRef name , Bool clonechild = true )
Constructor of the SFXXMLEntityReference class.
SFXXMLEntityReference( SFXXMLEntityReferenceConstRef other , Bool deep = false )
Constructor of the SFXXMLEntityReference class.
~SFXXMLEntityReference( Void )
Destructor of the SFXXMLEntityReference 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.
SFXXMLNodePtr GetNextSibling( Void )
Get the next sibling node.
ACharConstPtr GetNodeName( Void )
Get the node name.
NodeType GetNodeType( Void )
Get the node type.
SFXXMLNodePtr GetParentNode( Void )
Get the parent node.
SFXXMLNodePtr GetPreviousSibling( Void )
Get the previous sibling node.
Bool HasChildNodes( Void )
Check wheteher this node has any child nodes or not.
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.
ACharConstPtr GetNodeValue( Void ) (inherits from SFXXMLNode)
Get the node value.
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 )

SFXXMLEntityReference::SFXXMLEntityReference
Constructor of the SFXXMLEntityReference class.
[ public, explicit ]
SFXXMLEntityReference(
    SFXXMLDocumentPtr owner      // root
    SFXAnsiStringConstRef name   // node name
    Bool clonechild = true       // whether or not to copy child nodes
);
[ public, explicit ]
SFXXMLEntityReference(
    SFXXMLEntityReferenceConstRef other   // EntityReference node
    Bool deep = false                     // whether or not to copy child nodes recursively
);

SFXXMLEntityReference::~SFXXMLEntityReference
Destructor of the SFXXMLEntityReference class.
[ public, virtual ]
virtual ~SFXXMLEntityReference(Void);

SFXXMLEntityReference::AppendChild
Append the specified child node at the end.
[ public, virtual ]
SFCError AppendChild(
    SFXXMLNodeConstPtr newchild   // child node to append
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If failed: SFERR_FAILED

Description

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.

Reference

SFXXMLNode::AppendChild | SFXXMLNode


SFXXMLEntityReference::CloneNode
Create a copy of this node.
[ 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
);

Argument

clonenode

Specify the target node where to copy this node.

deep

If true is set to this argument, copy the child nodes recursively.

Otherwise, copy only this node.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED

Reference

SFXXMLNode::CloneNode | SFXXMLNode


SFXXMLEntityReference::GetChildNodes
Get all the child nodes.
[ public, virtual, const ]
DOMNodeListPtr GetChildNodes(Void);

Return value

Return the pointer to the SFXXMLNode::DOMNodeList instance that contains all child nodes of this node.

Description

[Note] Note
Each element of SFXXMLNode::DOMNodeList is of the "pointer to the SFXXMLNode" type.

Reference

SFXXMLNode::DOMNodeList | SFXXMLNode::GetChildNodes | SFXXMLNode


SFXXMLEntityReference::GetFirstChild
Get the first child node.
[ public, virtual, const ]
SFXXMLNodePtr GetFirstChild(Void);

Return value

Return the first child node of this node. Return null if this node has no child.

Reference

SFXXMLNode::GetFirstChild | SFXXMLNode


SFXXMLEntityReference::GetLastChild
Get the last child node.
[ public, virtual, const ]
SFXXMLNodePtr GetLastChild(Void);

Return value

Return the last child node of this node. Return null if this node has no child.

Reference

SFXXMLNode::GetLastChild | SFXXMLNode


SFXXMLEntityReference::GetNextSibling
Get the next sibling node.
[ public, virtual, const ]
SFXXMLNodePtr GetNextSibling(Void);

Return value

Return the next sibling node of this node. If this node has no next sibling node, null is returned.

Reference

SFXXMLEntityReference::GetPreviousSibling | SFXXMLNode::GetNextSibling| SFXXMLNode::GetPreviousSibling | SFXXMLNode


SFXXMLEntityReference::GetNodeName
Get the node name.
[ public, virtual, const ]
ACharConstPtr GetNodeName(Void);

Description

[Note] Note
The name of the EntityReferece node is the referred entity name of the XML document.

Reference

SFXXMLNode::GetNodeName | SFXXMLNode


SFXXMLEntityReference::GetNodeType
Get the node type.
[ public, virtual, const ]
NodeType GetNodeType(Void);

Return value

Return ENTITY_REFERENCE_NODE.

Reference

SFXXMLNode::NodeType | SFXXMLNode::GetNodeType | SFXXMLNode


SFXXMLEntityReference::GetParentNode
Get the parent node.
[ public, virtual, const ]
SFXXMLNodePtr GetParentNode(Void);

Return value

Return the parent node of this node. Return null if this node has no parent.

Reference

SFXXMLNode::GetParentNode | SFXXMLNode


SFXXMLEntityReference::GetPreviousSibling
Get the previous sibling node.
[ public, virtual, const ]
SFXXMLNodePtr GetPreviousSibling(Void);

Return value

Return the previous sibling node of this node. If this node has no previous sibling node, null is returned.

Reference

SFXXMLEntityReference::GetNextSibling | SFXXMLNode::GetPreviousSibling | SFXXMLNode::GetNextSibling | SFXXMLNode


SFXXMLEntityReference::HasChildNodes
Check wheteher this node has any child nodes or not.
[ public, virtual, const ]
Bool HasChildNodes(Void);

Return value

  • If yes: true
  • Otherwise: false

Reference

SFXXMLNode::HasChildNodes | SFXXMLNode


SFXXMLEntityReference::InsertBefore
Insert the specified node.
[ public, virtual ]
SFCError InsertBefore(
    SFXXMLNodeConstPtr newchild   // node to insert
    SFXXMLNodeConstPtr refchild   // newchild node is inserted before refchild node
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If failed: SFERR_FAILED

Reference

SFXXMLNode::InsertBefore | SFXXMLNode


SFXXMLEntityReference::RemoveChild
Remove the specified child node including its descendant nodes.
[ public, virtual ]
SFCError RemoveChild(
    SFXXMLNodeConstPtr oldchild   // child node to remove
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid parameter: SFERR_INVALID_PARAM
  • If failed: SFERR_FAILED

Reference

SFXXMLNode::RemoveChild | SFXXMLNode


SFXXMLEntityReference::ReplaceChild
Replace the specified child node.
[ public, virtual ]
SFCError ReplaceChild(
    SFXXMLNodeConstPtr newchild   // new child node to replace with
    SFXXMLNodeConstPtr oldchild   // old child node to be replaced
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid argument: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If failed: SFERR_FAILED

Reference

SFXXMLNode::ReplaceChild | SFXXMLNode