TutXmlClone


Name

TutXmlClone — make an identical copy of an XML object

Synopsis

T_XML TutXmlClone(xml_obj) 
T_XML xml_obj; 

Arguments

xml_obj — XML object to clone

Return Values

Copy of the original XML object if successful; NULL otherwise.

Diagnostics

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

Description

TutXmlClone makes a copy of an existing XML object. The copied XML object does not share any memory with the original XML object.

Caution

Destroy the XML object returned by TutXmlClone when it is no longer needed by calling TutXmlDestroy.

See Also

TutXmlCreate, TutXmlDestroy

Examples

This example creates a new XML object, then makes a copy of that XML object:

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

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