Parasol Framework
  • Gallery
  • API
  • Wiki
  • GitHub
    •  Overview
    • XValueNodes()
    • XValueToNumber()
    • XValueToString()
    • Audio
    • Core
    • Display
    • Fluid
    • Font
    • Network
    • Regex
    • Vector
    • XML
    • XPath
      • Audio
      • Sound
      • File
      • MetaClass
      • Module
      • StorageDevice
      • Task
      • Thread
      • Time
      • Compression
      • CompressedStream
      • Config
      • Script
      • XML
      • Controller
      • BlurFX
      • ColourFX
      • CompositeFX
      • ConvolveFX
      • DisplacementFX
      • FilterEffect
      • FloodFX
      • ImageFX
      • LightingFX
      • MergeFX
      • MorphologyFX
      • OffsetFX
      • RemapFX
      • SourceFX
      • TurbulenceFX
      • WaveFunctionFX
      • Scintilla
      • ScintillaSearch
      • Bitmap
      • Clipboard
      • Display
      • Document
      • Font
      • Picture
      • Pointer
      • Surface
      • SVG
      • ClientSocket
      • HTTP
      • NetClient
      • NetLookup
      • NetSocket
      • Proxy
      • Vector
      • VectorClip
      • VectorColour
      • VectorEllipse
      • VectorFilter
      • VectorGradient
      • VectorGroup
      • VectorImage
      • VectorPath
      • VectorPattern
      • VectorPolygon
      • VectorRectangle
      • VectorScene
      • VectorShape
      • VectorSpiral
      • VectorText
      • VectorTransition
      • VectorViewport
      • VectorWave
      • Linux Builds
      • Windows Builds
      • Customising Your Build
      • Parasol Objects
      • Parasol In Depth
      • Fluid Reference Manual
      • Common API
      • FileSearch API
      • GUI API
      • JSON API
      • VFX API
      • Widgets
      • RIPL Reference Manual
      • Parasol Cmd Tool
      • Flute / Unit Testing
      • Embedded Document Format
      • FDL Reference Manual
      • FDL Tools
      • Action Reference Manual
      • System Error Codes

XML Module

Functions

XValueNodes | XValueToNumber | XValueToString

Structures

XMLAttrib | XMLTag | XPathValue

Classes

XML

Constants

XMF | XMI | XMS | XPVT | XSF | XTF

XValueNodes()

For node-set XPathValue objects, returns the node-set as an array.

ERR xml::XValueNodes(struct XPathValue * Value, pf::vector<struct XMLTag *> * Result)
ParameterDescription
ValueThe XPathValue to convert.
ResultThe 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.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
XML module documentation © Paul Manias © 2001-2025

XValueToNumber()

Converts an XPathValue to a 64-bit floating point value.

ERR xml::XValueToNumber(struct XPathValue * Value, DOUBLE * Result)
ParameterDescription
ValueThe XPathValue to convert.
ResultThe 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.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
XML module documentation © Paul Manias © 2001-2025

XValueToString()

Converts an XPathValue to its string representation.

ERR xml::XValueToString(const struct XPathValue * Value, std::string * Result)
ParameterDescription
ValueThe XPathValue to convert.
ResultReceives the string representation of the value.

Call XValueToString() to convert an XPathValue object into its string representation.

Error Codes

OkayOperation successful.
NullArgsFunction call missing argument value(s)
XML module documentation © Paul Manias © 2001-2025

XMF Type

Standard flags for the XML class.

NameDescription
XMF::HAS_SCHEMAAutomatically defined when a schema has been loaded into the XML object.
XMF::INCLUDE_COMMENTSBy default, comments are stripped when parsing XML input unless this flag is specified.
XMF::INCLUDE_SIBLINGSInclude siblings when building an XML string (GetXMLString only)
XMF::INCLUDE_WHITESPACEBy default the XML parser will skip content between tags when they contain pure whitespace. Setting this flag will retain all whitespace.
XMF::INDENTIndent the output of serialised XML to improve readability.
XMF::LOCK_REMOVEPrevents removal of tags from the XML tree. This specifically affects the RemoveTag and RemoveXPath methods.
XMF::LOG_ALLPrint extra log messages.
XMF::NAMESPACE_AWAREEnable namespace processing during parsing.
XMF::NEWCreates an empty XML object on initialisation - if the Path field has been set, the source file will not be loaded.
XMF::NO_ESCAPETurns off escape code conversion.
XMF::OMIT_TAGSPrevents tags from being output when the XML is serialised (output content only).
XMF::PARSE_ENTITYEnables parsing of DOCTYPE entities.
XMF::PARSE_HTMLAutomatically parse HTML escape codes.
XMF::READABLEIndent the output of serialised XML to improve readability.
XMF::STANDALONEAutomatically defined when the XML declaration specifies standalone="yes".
XMF::STRIP_CDATADo not serialise CDATA sections. Note that this option is used as a parameter, not an object flag.
XMF::STRIP_CONTENTStrip all content from incoming XML data.
XMF::STRIP_HEADERSXML headers found in the source data will not be included in the parsed results.
XMF::WELL_FORMEDBy 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.
XML module documentation © Paul Manias © 2001-2025

XMI Type

Tag insertion options.

NameDescription
XMI::CHILDInsert as the first child of the target.
XMI::CHILD_ENDInsert as the last child of the target.
XMI::NEXTInsert as the next tag of the target.
XMI::PREVInsert as the previous tag of the target.
XML module documentation © Paul Manias © 2001-2025

XMS Type

For SetAttrib()

NameDescription
XMS::NEWAdds 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::UPDATEAs for UPDATE_ONLY, but if the attribute does not exist, it will be created.
XMS::UPDATE_ONLYSetAttrib 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.
XML module documentation © Paul Manias © 2001-2025

XPVT Type

Type descriptors for XPathValue

NameDescription
XPVT::Boolean
XPVT::Date
XPVT::DateTime
XPVT::NodeSet
XPVT::Number
XPVT::String
XPVT::Time
XML module documentation © Paul Manias © 2001-2025

XSF Type

Options for the Sort method.

NameDescription
XSF::CHECK_SORTTells 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::DESCSort in descending order.
XML module documentation © Paul Manias © 2001-2025

XTF Type

Standard flags for XMLTag.

NameDescription
XTF::CDATATag represents CDATA.
XTF::COMMENTTag represents a comment of the format <!-- Comment -->.
XTF::INSTRUCTIONTag represents an instruction of the format <?xml?>.
XTF::NOTATIONTag represents a notation of the format <!XML>.
XML module documentation © Paul Manias © 2001-2025

XMLAttrib Structure

FieldTypeDescription
Namestd::stringName of the attribute
Valuestd::stringValue of the attribute
XML module documentation © Paul Manias © 2001-2025

XMLTag Structure

FieldTypeDescription
IDINTUnique ID assigned to the tag on creation
ParentIDINTUnique ID of the parent tag
LineNoINTLine number on which this tag was encountered
FlagsXTFOptional flags
NamespaceIDUINTHash of namespace URI or 0 for no namespace
Attribspf::vector<XMLAttrib>Array of attributes for this tag
Childrenpf::vector<XMLTag>Array of child tags
XML module documentation © Paul Manias © 2001-2025

XPathValue Structure

FieldTypeDescription
typeXPVTIdentifies the type of value stored
number_valueDOUBLE
string_valuestd::string
XML module documentation © Paul Manias © 2001-2025