lr_xml_insert
Example: lr_xml_insert | XML Functions (LR_XML) |
Inserts a new XML fragment into an XML string.
int lr_xml_insert( <List of specifications> [, <List of optional specifications> ] [, LAST]);
List of specifications | For the following list of required specifications, use the following string format:"Specification=value" XML: the XML Input String to query Choose one of the following: |
List of optional specifications | For the following list of optional specifications, use the following string format:"Specification=value" SelectAll: If "yes", all elements matching the query will be processed. If "no", only the first match will be processed. Default is "no". See Multiple Query Matching Position: the position to insert the XML fragment. Choose one of:
NotFound: See Continuing on Error |
LAST | A marker which indicates the end of the List of optional specifications |
The lr_xml_insert function queries the XML input string XML for values matching the Query criteria. It then inserts XmlFragment or XmlFragmentParam at the position (or positions) in the XML string returned by the Query.
Position specifies whether the insertion is done before or after the point returned. Additionally, the childPosition specifies that the fragment is inserted before the end of the tag found by the query. For example, if the input string is
<a>53</a>
an inserted fragment ("<b>ZZ</b>") in the child position will result in the string:
<a>53<b>ZZ</b></a>
The resulting string after insertion is placed in ResultParam, using the source document encoding. The output preserves the XML Character Encoding of the original document, independent of the input encoding. The input encoding uses the client's local encoding.
Return Values
See Return Values
Parameterization
See Parameterization