RXml(xml:Str, args:Str...):RichText

Create rich text string from XML. Parses the xml string. Tags are converted into rich text attributes. Entity references of the form &<digits>; are replaced by the respective element from args, where the first element is &0;.

For example,

  RXml("<font color='&0;'>This is <b>&1;</b></font>",
       "red", "great")

produces This is great.

In text mode, this function uses a simpler XML parser, and returns a plain string, as rich text attributes have no meaning to the text mode applications.

XML format: the following XML tags are allowed. They are inspired by XHTML tags.

<a href="...">Link
<b>Bold font
<big>Bigger font size
<br />Line break
<em>Currently, bold font
<font color="...">Text color; one of static (default), green, yellow, red, white, blue, dim.
<kbd>, <key>Key caps (Like This)
<small>Smaller font size
<tt>Typewriter font
<u>Underlined font

Note that PCC2 expects actual XML, not HTML, so you must write <br />, and you must otherwise match each opening tag with a closing tag.

Since: PCC2 1.99.21

See also: RStyle, RLink, Functions