AppendValue (XmlNode subroutine): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(No difference)
|
Revision as of 17:33, 31 December 2010
Append value to XmlNode
AppendValue is a member of the XmlNode class.
This subroutine appends a Unicode string or a Stringlist object to an XmlNode value.
AppendValue is new as of version 7.6 of the Sirius Mods.
Syntax
Call nod:AppendValue(value)
Syntax Terms
- nod
- An XmlNode that is not the Root node. If it is an Element node, it may have at most one child, and any such child must be a Text node.
- value
- A Unicode string or a Stringlist object.
Usage Notes
- The method argument must be a Unicode string or a Stringlist object:
- If a Unicode string, the value of the target node is set to its current value followed by the Unicode string.
- If a Stringlist object, the value of the target node is set to its current value followed by the Stringlist items converted from EBCDIC to Unicode, with Unicode linefeed characters between the Stringlist items.
Example
The following fragment appends a Unicode string and then a Stringlist to an Element value:
%n = %x:AddElement('a', 'begin value') %n:AppendValue('_some more_') Text To %sl and more and that's all End Text %n:AppendValue(%sl) %n:Print
The result is:
<a>begin value_some more_and more
and that's all</a>
Request-Cancellation Errors
- nod does not point to an XmlNode.
- nod points to the Root node.
- nod points to an Element node that has more than one child, or that has one, non-Text node child.
- value violates the rules for XML Element content (that is, it contains an invalid character).
- Insufficient free space exists in CCATEMP.
See Also
- Like AppendValue, AddText adds a string to and after a Text node, but only if the AdjacentText property is set to Combine.