TutXmlSetStr


Name

TutXmlSetStr — set the XML string

Synopsis

T_BOOL TutXmlSetStr(xml_obj, str) 
T_XML xml_obj; 
T_STR str; 

Arguments

xml_obj — XML object into which to set the XML string

str — XML string to set

Return Values

TRUE if successful, FALSE otherwise.

Diagnostics

If TutXmlSetStr fails, it returns FALSE and sets the global SmartSockets error number to one of these:

Description

TutXmlSetStr sets the string into the XML object. This function makes a copy of the string data. Any existing XML string is destroyed (freed).

Caution

None

See Also

TutXmlGetStr

Examples

This example creates a new XML object and initializes it to a valid XML string. It then sets the XML string in the new XML object to a new valid XML string.

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

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