Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

$$SYMENC^MXMLUTL(): XML—Replace XML Symbols with XML Encoding

Reference Type: Supported, Category: XML Parser (VistA), ICR#: 4153

Description

The $$SYMENC^MXMLUTL extrinsic function replaces reserved Extensible Markup Language (XML) symbols in a string with their XML encoding for strings used in an XML message.

Format

  $$SYMENC^MXMLUTL(str)

Input Parameters

str: (required) String to be encoded in an XML message.

Output

returns:

Returns the input string with XML encoding replacing reserved XML symbols.

Example

>S X=$$SYMENC^MXMLUTL("This line isn't &""<XML>"" safe as is.")

>W X
This line isn&apos;t &amp;&quot;&lt;XML&gt;&quot; safe as is.