TutXmlCreate


Name

TutXmlCreate — create a new XML object

Synopsis

T_XML T_ENTRY T_EXPORT TutXmlCreate(xml_str) 
T_STR xml_str; 

Arguments

xml_str — an XML string

Return Values

New XML object if successful, NULL otherwise.

Diagnostics

If TutXmlCreate fails, it returns NULL and sets the global SmartSockets error number to:

Description

TutXmlCreate creates a new XML object that represents the XML string xml_str. The xml_str parameter is copied so it does not need to remain allocated by the caller.

Caution

The returned XML object must be destroyed when no longer needed by calling TutXmlDestroy.

See Also

TutXmlCreateStatic, TutXmlDestroy

Examples

This example creates a new XML object and initializes it to a valid XML string:

T_STR xml_str = "<data><data1><temp=\"hot\"/></data1>" 
                "<data2><temp=\"cold\"/></data2></data>"; 
T_XML xml; 
 
xml = TutXmlCreate(xml_str); 
if (xml == NULL) { 
  /* error */ 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com