TutXmlCreateStatic create an XML object from a static buffer
xml_str
an XML string that must remain valid for the life of the XML object.
New XML object if successful, NULL
otherwise.
If TutXmlCreateStatic fails, it returns NULL
and sets the global SmartSockets error number to this:
TutXmlCreateStatic creates a new XML object from a static XML string. This function differs from TutXmlCreate because it does not copy the xml_str
. The xml_str
must remain valid (allocated and accessible) for the life of the newly created XML object.
The returned XML object must be destroyed when no longer needed by calling TutXmlDestroy.
This example creates a new XML object and initializes it to a valid XML string. The value of xml_str
must remain valid for the duration of the XML object that is returned by TutXmlCreateStatic.
T_STR xml_str = "<data><data1><temp=\"hot\"/></data1>" "<data2><temp=\"cold\"/></data2></data>"; T_XML xml; xml = TutXmlCreateStatic(xml_str); if (xml == NULL) {/* error */
}/* xml_str MUST remain valid until TutXmlDestroy is called */
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |