XML Parser (#960)

$xml is a nice XML parser. It was originally programmed intending for public consumption, but a new and simpler interface to the XML parser now exists in the $xmlnode WAIF class. Nonetheless, here is a list of the verbs on $xml:

  • $xml<img src=">arse - Given a string or list or strings, this verb parses the XML in the string and returns a formatted list containing all the elements. If a list of strings is passed in, they are combined with a 'virtual-line-break' denoted by the characters *, /, and - in sequence. The formatted list returned is in the form of {tagname, attribute-list, children-list}, where children-list will contain text, and more instances of lists formatted in the same manner where subtags exist.

  • $xml:find_styleobject - For human-displayable XML, a MOO 'style-object' ($xso) sometimes exists. This $xso object is used to style the object. This verb is used to find an appropriate style object for the user's rendering object.

  • $xml:Dump - Given the formatted list returned from $xml<img src=">arse, $xml:Dump returns the original XML.

  • You are not logged in.

    [home | help | who | search | setup | code]