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

Inheritance diagram

 Inheritance diagram of SFXXMLEntityClass

Collaboration diagram

 Collaboration diagram of SFXXMLEntityClass

Description

An Entity node (SFXXMLEntity) contains a parsed entity or an unparsed one of the XML document.

Reference

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

Member

Constructor/Destructor
SFXXMLEntity( SFXXMLDocumentPtr owner , SFXAnsiStringConstRef name )
Constructor of the SFXXMLEntity class.
SFXXMLEntity( SFXXMLEntityConstRef other , Bool deep = false )
Constructor of the SFXXMLEntity class.
~SFXXMLEntity( Void )
Desctructor of SFXXMLEntity 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.
ACharConstPtr GetEncoding( Void )
Get the encoding.
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.
ACharConstPtr GetNodeValue( Void )
Get the node value.
ACharConstPtr GetNotationName( Void )
Get the notation name.
SFXXMLNodePtr GetPreviousSibling( Void )
Get the previous sibling node.
ACharConstPtr GetPublicID( Void )
Get the public identifier.
ACharConstPtr GetSystemID( Void )
Get the system identifier.
ACharConstPtr GetValue( Void )
Get the node value.
ACharConstPtr GetVersion( Void )
Get the version number.
Bool HasChildNodes( Void )
Check whether 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.
Void SetEncoding( ACharConstPtr encoding )
Set the encoding.
Void SetNodeValue( ACharConstPtr value )
Set the node value.
Void SetNotationName( ACharConstPtr name )
Set the notation name
Void SetPublicID( ACharConstPtr id )
Set the public identifier.
Void SetSystemID( ACharConstPtr id )
Set the system identifier.
Void SetValue( SFXAnsiStringConstRef value )
Set entity node value.
Void SetVersion( ACharConstPtr version )
Set version number.
Bool EqualNode( SFXXMLNodeConstPtr arg ) (inherits from SFXXMLNode)
Check whether this node equals the specified node or not.
SFXXMLNodePtr GetParentNode( Void ) (inherits from SFXXMLNode)
Get the parent 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.
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 )

SFXXMLEntity::SFXXMLEntity
Constructor of the SFXXMLEntity class.
[ public, explicit ]
SFXXMLEntity(
    SFXXMLDocumentPtr owner      // root node of the DOM tree
    SFXAnsiStringConstRef name   // name of the Entity node
);
[ public, explicit ]
SFXXMLEntity(
    SFXXMLEntityConstRef other   // Entity node
    Bool deep = false            // whether or not to copy child nodes recursively
);

SFXXMLEntity::~SFXXMLEntity
Desctructor of SFXXMLEntity class.
[ public, virtual ]
virtual ~SFXXMLEntity(Void);

SFXXMLEntity::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


SFXXMLEntity::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, 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


SFXXMLEntity::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


SFXXMLEntity::GetEncoding
Get the encoding.
[ public, const ]
ACharConstPtr GetEncoding(Void);

Return value

Return the encoding of entity in case of parsed entity. Return null in case of unparsed entity.

Reference

SFXXMLEntity::SetEncoding


SFXXMLEntity::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


SFXXMLEntity::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


SFXXMLEntity::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

SFXXMLEntity::GetPreviousSibling | SFXXMLNode::GetNextSibling| SFXXMLNode::GetPreviousSibling | SFXXMLNode


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

Description

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

Reference

SFXXMLNode::GetNodeName | SFXXMLNode


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

Return value

Return ENTITY_NODE.

Reference

SFXXMLNode::NodeType | SFXXMLNode::GetNodeType | SFXXMLNode


SFXXMLEntity::GetNodeValue
Get the node value.
[ public, virtual, const ]
ACharConstPtr GetNodeValue(Void);

Description

Get the value of Entity node.

Same as the SFXXMLEntity::GetValue function.

Reference

SFXXMLEntity::GetValue | SFXXMLNode::GetNodeValue | SFXXMLNode


SFXXMLEntity::GetNotationName
Get the notation name.
[ public, const ]
ACharConstPtr GetNotationName(Void);

Return value

Return the notation name of the entity in case of parsed entity. Return null in case of unparsed entity.

Reference

SFXXMLEntity::SetNotationName


SFXXMLEntity::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

SFXXMLEntity::GetNextSibling | SFXXMLNode::GetPreviousSibling | SFXXMLNode::GetNextSibling | SFXXMLNode


SFXXMLEntity::GetPublicID
Get the public identifier.
[ public, const ]
ACharConstPtr GetPublicID(Void);

Return value

If the public identifier is not set to this node, null is returned.

Reference

SFXXMLEntity::SetPublicID


SFXXMLEntity::GetSystemID
Get the system identifier.
[ public, const ]
ACharConstPtr GetSystemID(Void);

Return value

If the system identifier is not set to this node, null is returned.

In some cases, the system identifier may be an absolute URI.

Reference

SFXXMLEntity::SetSystemID


SFXXMLEntity::GetValue
Get the node value.
[ public, const ]
ACharConstPtr GetValue(Void);

Description

Get the value of Entity node.

Same as the SFXXMLEntity::GetNodeValue function.

Reference

SFXXMLEntity::GetNodeValue


SFXXMLEntity::GetVersion
Get the version number.
[ public, const ]
ACharConstPtr GetVersion(Void);

Return value

Return the version number of entity if parsed entity. Return null if unparsed entity.

Reference

SFXXMLEntity::SetVersion


SFXXMLEntity::HasChildNodes
Check whether 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


SFXXMLEntity::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


SFXXMLEntity::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


SFXXMLEntity::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


SFXXMLEntity::SetEncoding
Set the encoding.
[ public ]
Void SetEncoding(
    ACharConstPtr encoding   // encoding to set
);

Reference

SFXXMLEntity::GetEncoding


SFXXMLEntity::SetNodeValue
Set the node value.
[ public, virtual ]
Void SetNodeValue(
    ACharConstPtr value   // new node content
);

Description

Set the value to the Entity node.

Same as the SFXXMLEntity::SetValue function.

Reference

SFXXMLEntity::SetValue | SFXXMLNode::SetNodeValue | SFXXMLNode


SFXXMLEntity::SetNotationName
Set the notation name
[ public ]
Void SetNotationName(
    ACharConstPtr name   // notation name to set
);

Reference

SFXXMLEntity::GetNotationName


SFXXMLEntity::SetPublicID
Set the public identifier.
[ public ]
Void SetPublicID(
    ACharConstPtr id   // public identifier to set
);

Reference

SFXXMLEntity::GetPublicID


SFXXMLEntity::SetSystemID
Set the system identifier.
[ public ]
Void SetSystemID(
    ACharConstPtr id   // system identifier to set
);

Reference

SFXXMLEntity::GetSystemID


SFXXMLEntity::SetValue
Set entity node value.
[ public ]
Void SetValue(
    SFXAnsiStringConstRef value   // entity value
);

Description

Set the value to the Entity node.

Same as the SFXXMLEntity::SetNodeValue function.

Reference

SFXXMLEntity::SetNodeValue


SFXXMLEntity::SetVersion
Set version number.
[ public ]
Void SetVersion(
    ACharConstPtr version   // version number
);

Reference

SFXXMLEntity::GetVersion