Legend
| Static class: RT.Util.RhoML
SummaryExposes methods related to the RhoML language. See Remarks.RemarksRhoML is a language which parses into a tree somewhat reminiscent of XML. The document is represented by a root RhoElement, and consists of a tree of RhoNodes. Two types of nodes exist: elements, which have a name and may have attributes, and text nodes, which simply contain raw text. Only elements may contain sub-nodes. Except for the root element, all elements must have a name, which can be an arbitrary string. The root element's name is null. An element may have a default attribute value, as well as any number of additional named attribute/value pairs. The attribute names and values can also be arbitrary strings. A named attribute is not required to have a value.
Syntactically, an element is delimited by an opening and a closing tag. The closing tag is always The following is an example of valid RhoML with an explanation of what is represented: Basic {font=Times New Roman}example{}: element named "font" with the default attribute set. Another {blah,foo=bar,stuff}example{}: element named "blah", no default attribute, two named attributes ("foo" and "stuff"), the first of which has the value "bar" while the second one has no value. Other than the two elements, the rest of this RhoML is literal text. The element name and attribute names/values can all be specified using either quoted or unquoted syntax. Unquoted syntax is limited in what strings can be expressed, while quoted syntax allows every possible string to be represented:
Whitespace is significant in all contexts, with some exceptions inside the opening tag of an element.
Specifically, whitespace is ignored inside the opening tag between all syntactic elements (but not inside
names/values), with the sole exception of immediately after
Within a run of text, only the A more complex example (the entire example is valid RhoML): This curly bracket { is interpreted literally, as is this } one. This {{ is a single open curly. Here {` is ``{ `}an element{} whose name is " is `{ ", containing a text node with the text "an element". Here's an element with some generous {use = of spaces , you = see}.{}; this represents an element named "use", with a default attribute value "of spaces", and an attribute named "you" with a value "see". Static methods
|