%XML_ELEM_SETNAME
Set the tag name of an XML element
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
status = %XML_ELEM_SETNAME(element, tag_name)
Return value
status
XML_SUCCESS if the tag name is set successfully.
Arguments
element
The XML element instance for which a tag name will be set. (XML_ELEM_TYPE)
tag_name
The tag name string value to set for the specified element. The maximum length is 256 characters. (a)
Discussion
%XML_ELEM_SETNAME defines the tag name for the specified XML element. The tag name is the text that appears in the begin and end tags required to delimit each element. If you are assembling Synergy data in XML format, one of the first things you should do after you create the XML document is to set the name of the root element with %XML_ELEM_SETNAME.
This function is defined as ^VAL.
Examples
The example below sets the tag name for the root element to weather-report. The begin and end tags would be <weather-report> and </weather-report>, respectively.
xcall xml_elem_setName(root, "weather-report")
Also see Example of assembling XML.