AppendValue (XmlNode subroutine)

From m204wiki
Jump to navigation Jump to search

Append to value of node (XmlNode class)

[Requires Janus SOAP]

AppendValue appends a Unicode string or a Stringlist object to an XmlNode value.


nod:AppendValue( appendedValue)

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.
appendedValue 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.
  • AppendValue is available in Sirius Mods Version 7.6 and later.


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&#xA;and that's all</a>

Request-cancellation errors

This list is not exhaustive: it does not include all the errors that are request cancelling.

  • The nod argument 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.
  • The appendedValue argument violates the rules for XML Element content (that is, it contains an invalid character).
  • Insufficient free space exists in CCATEMP.

See also

  • AddText also adds a string to and after a Text node, but only if the AdjacentText property is set to Combine.