XValueNodes | XValueToNumber | XValueToString
XMLAttrib | XMLTag | XPathValue
For node-set XPathValue objects, returns the node-set as an array.
Parameter | Description |
---|---|
Value | The XPathValue to convert. |
Result | The node-set is returned here as an array of XMLTag structures. |
If an XPathValue represents a node-set (type XPVT::NODE_SET
) then XValueToNodes() will return a direct pointer to the node-set array.
Note: The integrity of the array is not guaranteed if the original XML document is modified or freed.
Okay | Operation successful. |
---|---|
NullArgs | Function call missing argument value(s) |
Converts an XPathValue to a 64-bit floating point value.
Parameter | Description |
---|---|
Value | The XPathValue to convert. |
Result | The numeric representation of the value is returned here. |
Call XValueToNumber() to convert an XPathValue object to a 64-bit floating point number. This function also includes cover support for boolean types, converting true to 1.0 and false to 0.
Okay | Operation successful. |
---|---|
NullArgs | Function call missing argument value(s) |
Converts an XPathValue to its string representation.
Parameter | Description |
---|---|
Value | The XPathValue to convert. |
Result | Receives the string representation of the value. |
Call XValueToString() to convert an XPathValue object into its string representation.
Okay | Operation successful. |
---|---|
NullArgs | Function call missing argument value(s) |
Standard flags for the XML class.
Name | Description |
---|---|
XMF::HAS_SCHEMA | Automatically defined when a schema has been loaded into the XML object. |
XMF::INCLUDE_COMMENTS | By default, comments are stripped when parsing XML input unless this flag is specified. |
XMF::INCLUDE_SIBLINGS | Include siblings when building an XML string (GetXMLString only) |
XMF::INCLUDE_WHITESPACE | By default the XML parser will skip content between tags when they contain pure whitespace. Setting this flag will retain all whitespace. |
XMF::INDENT | Indent the output of serialised XML to improve readability. |
XMF::LOCK_REMOVE | Prevents removal of tags from the XML tree. This specifically affects the RemoveTag and RemoveXPath methods. |
XMF::LOG_ALL | Print extra log messages. |
XMF::NAMESPACE_AWARE | Enable namespace processing during parsing. |
XMF::NEW | Creates an empty XML object on initialisation - if the Path field has been set, the source file will not be loaded. |
XMF::NO_ESCAPE | Turns off escape code conversion. |
XMF::OMIT_TAGS | Prevents tags from being output when the XML is serialised (output content only). |
XMF::PARSE_ENTITY | Enables parsing of DOCTYPE entities. |
XMF::PARSE_HTML | Automatically parse HTML escape codes. |
XMF::READABLE | Indent the output of serialised XML to improve readability. |
XMF::STANDALONE | Automatically defined when the XML declaration specifies standalone="yes". |
XMF::STRIP_CDATA | Do not serialise CDATA sections. Note that this option is used as a parameter, not an object flag. |
XMF::STRIP_CONTENT | Strip all content from incoming XML data. |
XMF::STRIP_HEADERS | XML headers found in the source data will not be included in the parsed results. |
XMF::WELL_FORMED | By default, the XML class will accept badly structured XML data. This flag requires that XML statements must be well-formed (tags must balance) or an ERR::BadData error will be returned during processing. |
Tag insertion options.
Name | Description |
---|---|
XMI::CHILD | Insert as the first child of the target. |
XMI::CHILD_END | Insert as the last child of the target. |
XMI::NEXT | Insert as the next tag of the target. |
XMI::PREV | Insert as the previous tag of the target. |
For SetAttrib()
Name | Description |
---|---|
XMS::NEW | Adds a new attribute. Note that if the attribute already exists, this will result in at least two attributes of the same name in the tag. |
XMS::UPDATE | As for UPDATE_ONLY , but if the attribute does not exist, it will be created. |
XMS::UPDATE_ONLY | SetAttrib will find the target attribute and update it. It is not possible to rename the attribute when using this technique. ERR::Search is returned if the attribute cannot be found. |
Type descriptors for XPathValue
Name | Description |
---|---|
XPVT::Boolean | |
XPVT::Date | |
XPVT::DateTime | |
XPVT::NodeSet | |
XPVT::Number | |
XPVT::String | |
XPVT::Time |
Options for the Sort method.
Name | Description |
---|---|
XSF::CHECK_SORT | Tells the algorithm to check for a 'sort' attribute in each analysed tag and if found, the algorithm will use that as the sort value instead of that indicated in the Attrib field. |
XSF::DESC | Sort in descending order. |
Standard flags for XMLTag.
Name | Description |
---|---|
XTF::CDATA | Tag represents CDATA . |
XTF::COMMENT | Tag represents a comment of the format <!-- Comment --> . |
XTF::INSTRUCTION | Tag represents an instruction of the format <?xml?> . |
XTF::NOTATION | Tag represents a notation of the format <!XML> . |
Field | Type | Description |
---|---|---|
Name | std::string | Name of the attribute |
Value | std::string | Value of the attribute |
Field | Type | Description |
---|---|---|
ID | INT | Unique ID assigned to the tag on creation |
ParentID | INT | Unique ID of the parent tag |
LineNo | INT | Line number on which this tag was encountered |
Flags | XTF | Optional flags |
NamespaceID | UINT | Hash of namespace URI or 0 for no namespace |
Attribs | pf::vector<XMLAttrib> | Array of attributes for this tag |
Children | pf::vector<XMLTag> | Array of child tags |
Field | Type | Description |
---|---|---|
type | XPVT | Identifies the type of value stored |
number_value | DOUBLE | |
string_value | std::string |