![]() |
AIXMLNodeSuite Struct Reference
|
Public Attributes | |
AIAPI ai::int32(* | AddRef )(AIXMLNodeRef node) |
Increments the reference count for an XML node. | |
AIAPI ai::int32(* | Release )(AIXMLNodeRef node) |
Decrements the reference count for an XML node, and frees the memory when the reference count is 0. | |
AIAPI AIErr(* | Clone )(AIXMLNodeRef src, AIXMLNodeRef *dst) |
Creates an exact duplicate of an XML node. | |
AIAPI AIErr(* | Copy )(AIXMLNodeRef node, AIXMLNodeRef src) |
Copies the contents of an XML node into another existing node. | |
AIAPI AIErr(* | GetNodeType )(AIXMLNodeRef node, AIXMLNodeType *type) |
Retrieves the type of an XML node. | |
AIAPI AIErr(* | GetNodeName )(AIXMLNodeRef node, AIXMLName *name) |
Retrieves the name of an XML node. | |
AIAPI AIErr(* | SetNodeName )(AIXMLNodeRef node, AIXMLName name) |
Sets the name of an XML node. | |
AIAPI AIErr(* | GetNodeValue )(AIXMLNodeRef node, AIXMLString *value) |
Retrieves the value of an XML node. | |
AIAPI AIErr(* | SetNodeValue )(AIXMLNodeRef node, AIXMLString value) |
Sets the value of an XML node. | |
AIAPI AIErr(* | GetChildNodes )(AIXMLNodeRef node, AIXMLNodeListRef *nodes) |
Retrieves a node list containing the child nodes of an XML node. | |
AIAPI AIErr(* | GetAttributes )(AIXMLNodeRef node, AIXMLNamedNodeMapRef *attributes) |
Retrieves a named node map containing the attributes associated with an XML node. | |
AIAPI AIErr(* | InsertBefore )(AIXMLNodeRef node, AIXMLNodeRef newchild, AIXMLNodeRef refchild) |
Inserts a new child node in an XML node. | |
AIAPI AIErr(* | ReplaceChild )(AIXMLNodeRef node, AIXMLNodeRef newchild, AIXMLNodeRef oldchild) |
Replaces one child of an XML node with another child node. | |
AIAPI AIErr(* | RemoveChild )(AIXMLNodeRef node, AIXMLNodeRef oldchild) |
Removes a child node from an XML node. | |
AIAPI AIErr(* | AppendChild )(AIXMLNodeRef node, AIXMLNodeRef newchild) |
Appends a new child node to the child list of an XML node. | |
AIAPI AIErr(* | HasChildNodes )(AIXMLNodeRef node, AIBoolean *haschildren) |
Reports whether an XML node has any children. | |
AIAPI AIXMLName(* | NameFromString )(const char *string) |
Converts a C string to an XML node name. | |
AIAPI const char *(* | StringFromName )(AIXMLName name) |
Converts an XML name to a C string. | |
AIAPI AIXMLName(* | NameFromUnicodeString )(const ai::UnicodeString &string) |
Converts a Unicode string to an XML node name. | |
AIAPI AIErr(* | UnicodeStringFromName )(AIXMLName name, ai::UnicodeString &string) |
Converts an XML name to a Unicode string. | |
AIAPI AIErr(* | GetData )(AIXMLNodeRef node, AIDictKey key, AIEntryRef *value) |
AIAPI AIErr(* | SetData )(AIXMLNodeRef node, AIDictKey key, AIEntryRef value) |
AIAPI AIErr(* | RemoveData )(AIXMLNodeRef node, AIDictKey key) |
AIAPI AIErr(* | Compare )(AIXMLNodeRef node1, AIXMLNodeRef node2, AIBoolean deep, ai::int32 *result) |
Compares two XML nodes for equality. |
This suite allows you to create and manipulate XML nodes.
The XML node suite provides an approximate implementation of the XML Level 1 DOM interface for nodes. See http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
SPBasicSuite::AcquireSuite()
with the constants kAIXMLNodeSuite
and kAIXMLNodeVersion
.The values of "NodeName", "NodeValue", and "Attributes" vary according to the node type as follows:
NodeName | NodeValue | Attributes | |
Element | tag name | null | NamedNodeMap |
Attr | attribute name | attribute value | null |
Text | #text | text value | null |
CDATASection | #cdata-section | CDATA contents | null |
Comment | #comment | comment string | null |
EntityReference | entity ref name | null | null |
Entity | entity name | null | null |
P.Instruction | target name | content | null |
Document | #document | null | null |
DocumentType | document type name | null | null |
DocumentFrag | #document-fragment | null | null |
Notation | notation name | null | null |
AIAPI ai::int32(* AIXMLNodeSuite::AddRef)(AIXMLNodeRef node) |
Increments the reference count for an XML node.
When you create a node, the initial count is 1. Use Release()
to decrement the count. (Note that this function returns a numeric value, not an error code.)
node | The XML node reference. |
AIAPI AIErr(* AIXMLNodeSuite::AppendChild)(AIXMLNodeRef node, AIXMLNodeRef newchild) |
Appends a new child node to the child list of an XML node.
node | The XML node reference for the parent node. | |
newchild | The new child node. |
AIAPI AIErr(* AIXMLNodeSuite::Clone)(AIXMLNodeRef src, AIXMLNodeRef *dst) |
Creates an exact duplicate of an XML node.
performing a deep copy.
src | The source node. | |
dst | [out] A buffer in which to return the new node. |
AIAPI AIErr(* AIXMLNodeSuite::Compare)(AIXMLNodeRef node1, AIXMLNodeRef node2, AIBoolean deep, ai::int32 *result) |
Compares two XML nodes for equality.
Nodes are equal if they have the same type, name, and value, and if they each have the same attributes with the same values. They are deeply equal if their sequences of child nodes are also equal. When comparing values, the function converts them to real numbers if possible, and otherwise compares the strings.
node1 | The first node. | |
node2 | The second node. | |
deep | True to perform a deep comparison. | |
result | [out] A buffer in which to return true (non-zero) if the nodes are equal. |
AIAPI AIErr(* AIXMLNodeSuite::Copy)(AIXMLNodeRef node, AIXMLNodeRef src) |
Copies the contents of an XML node into another existing node.
node | The node whose contents are replaced. | |
src | The source node. |
AIAPI AIErr(* AIXMLNodeSuite::GetAttributes)(AIXMLNodeRef node, AIXMLNamedNodeMapRef *attributes) |
Retrieves a named node map containing the attributes associated with an XML node.
node | The XML node reference. | |
attributes | [out] A buffer in which to return the node map. |
AIAPI AIErr(* AIXMLNodeSuite::GetChildNodes)(AIXMLNodeRef node, AIXMLNodeListRef *nodes) |
Retrieves a node list containing the child nodes of an XML node.
node | The XML node reference. | |
nodes | [out] A buffer in which to return the node list. |
AIAPI AIErr(* AIXMLNodeSuite::GetData)(AIXMLNodeRef node, AIDictKey key, AIEntryRef *value) |
AIAPI AIErr(* AIXMLNodeSuite::GetNodeName)(AIXMLNodeRef node, AIXMLName *name) |
Retrieves the name of an XML node.
node | The XML node reference. | |
name | [out] A buffer in which to return the name. |
AIAPI AIErr(* AIXMLNodeSuite::GetNodeType)(AIXMLNodeRef node, AIXMLNodeType *type) |
Retrieves the type of an XML node.
node | The XML node reference. | |
type | [out] A buffer in which to return the type constant. |
AIAPI AIErr(* AIXMLNodeSuite::GetNodeValue)(AIXMLNodeRef node, AIXMLString *value) |
Retrieves the value of an XML node.
node | The XML node reference. | |
value | [out] A buffer in which to return the value. |
AIAPI AIErr(* AIXMLNodeSuite::HasChildNodes)(AIXMLNodeRef node, AIBoolean *haschildren) |
Reports whether an XML node has any children.
node | The XML node reference. | |
haschildren | [out] A buffer in which to return true if the node has children. |
AIAPI AIErr(* AIXMLNodeSuite::InsertBefore)(AIXMLNodeRef node, AIXMLNodeRef newchild, AIXMLNodeRef refchild) |
Inserts a new child node in an XML node.
node | The XML node reference for the parent node. | |
newchild | The new child node. | |
refchild | An existing child node before which to insert the new child, or NULL to insert the new child at the end of the child list. |
AIAPI AIXMLName(* AIXMLNodeSuite::NameFromString)(const char *string) |
Converts a C string to an XML node name.
(Note that this function returns an XML name value, not an error code,)
string | The C string. |
AIAPI AIXMLName(* AIXMLNodeSuite::NameFromUnicodeString)(const ai::UnicodeString &string) |
Converts a Unicode string to an XML node name.
(Note that this function returns an XML name value, not an error code,)
string | The Unicode string. |
AIAPI ai::int32(* AIXMLNodeSuite::Release)(AIXMLNodeRef node) |
Decrements the reference count for an XML node, and frees the memory when the reference count is 0.
When you create a node, the initial count is 1. Use AddRef()
to increment the count. (Note that this function returns a numeric value, not an error code.)
node | The XML node reference. |
AIAPI AIErr(* AIXMLNodeSuite::RemoveChild)(AIXMLNodeRef node, AIXMLNodeRef oldchild) |
Removes a child node from an XML node.
node | The XML node reference for the parent node. | |
oldchild | An existing child node to remove. |
AIAPI AIErr(* AIXMLNodeSuite::RemoveData)(AIXMLNodeRef node, AIDictKey key) |
AIAPI AIErr(* AIXMLNodeSuite::ReplaceChild)(AIXMLNodeRef node, AIXMLNodeRef newchild, AIXMLNodeRef oldchild) |
Replaces one child of an XML node with another child node.
node | The XML node reference for the parent node. | |
newchild | The new child node. | |
oldchild | An existing child node to replace. |
AIAPI AIErr(* AIXMLNodeSuite::SetData)(AIXMLNodeRef node, AIDictKey key, AIEntryRef value) |
AIAPI AIErr(* AIXMLNodeSuite::SetNodeName)(AIXMLNodeRef node, AIXMLName name) |
Sets the name of an XML node.
node | The XML node reference. | |
name | The new name. |
AIAPI AIErr(* AIXMLNodeSuite::SetNodeValue)(AIXMLNodeRef node, AIXMLString value) |
Sets the value of an XML node.
node | The XML node reference. | |
name | The new value. |
AIAPI const char*(* AIXMLNodeSuite::StringFromName)(AIXMLName name) |
Converts an XML name to a C string.
(Note that this function returns a string value, not an error code,)
name | The XML name. |
AIAPI AIErr(* AIXMLNodeSuite::UnicodeStringFromName)(AIXMLName name, ai::UnicodeString &string) |
Converts an XML name to a Unicode string.
name | The XML name. | |
string | [out] A buffer in which to return the Unicode string. |
Contents | Suites | Classes | Class Index | Member Index |
![]() |
|