TutXmlGetStr


Name

TutXmlGetStr — return the XML string associated with the XML object

Synopsis

T_BOOL TutXmlGetStr(xml_obj, str_return) 
T_XML xml_obj; 
T_STR *str_return; 

Arguments

xml_obj — XML object from which to get the string

str_return — storage for the string value from the XML object

Return Values

TRUE if successful, FALSE otherwise.

Diagnostics

If TutXmlGetStr fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TutXmlGetStr retrieves the string associated with the XML object.

Caution

If TutXmlGetStr returns FALSE, it does not store a value in str_return.

The value stored in str_return points directly into an internal data structure and should not be modified.

See Also

TutXmlSetStr

Examples

This example creates a new XML object and initializes it to a valid XML string, then gets that XML string:

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

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