TutXmlDestroy


Name

TutXmlDestroy — destroy an XML object

Synopsis

T_BOOL TutXmlDestroy(xml_obj) 
T_XML xml_obj; 

Arguments

xml_obj — XML object to destroy

Return Values

TRUE if the XML object was successfully destroyed, FALSE otherwise.

Diagnostics

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

Description

TutXmlDestroy destroys the XML object. If the object is not static (that is, it was created with TutXmlCreate), the XML object and all the data contained by that object are destroyed. If the object is static (created with TutXmlCreateStatic), only the XML object itself is destroyed, not the data.

Caution

None

See Also

TutXmlCreate, TutXmlCreateStatic

Examples

This example creates a new XML object and initializes it to a valid XML string, then destroys the newly created XML object:

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 */ 
} 
if (!TutXmlDestroy(xml)) { 
  /* error */ 
} 

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