next | previous | forward | backward | up | top | index | toc | Macaulay2 website
XML :: parse(String)

parse(String) -- parse XML

Synopsis

Description

This function parses XML into a tree of hash tables of type XMLnode.

i1 : x = parse ///<foo a="hi there">ho there<bar/></foo>///

o1 = <foo a="hi there"
       "ho there"
       <bar

o1 : XMLnode
i2 : peek'_3 x

o2 = XMLnode{"a" => "hi there"                              }
             children => {"ho there", XMLnode{tag => "bar"}}
             tag => "foo"
i3 : x#"a"

o3 = hi there
i4 : x.children

o4 = {ho there, <bar}

o4 : List
i5 : class \ oo

o5 = {String, XMLnode}

o5 : List
i6 : x.tag

o6 = foo