Skip to content
Chris Petersen edited this page Oct 16, 2015 · 1 revision

The function accepts a filename or a Uniform Resource Identifier (URI) of the requested XML/HTML document and returns the SXML document being the SXML representation for the requested one. It provides a convenient wrapper for the XML parser (SSAX), the HTML parser (HtmlPrag) and remote resource accessor. Depending on the requested document type, the appropriate parser (either XML one or HTML one) is chosen automatically.

Parameter Description
uri URI or filename of XML/HTML document

Example

> (sxml:document "http://modis.ispras.ru/Lizorkin/XML/poem.xml")
(*TOP* (*PI* xml "version='1.0'")
       (poem (@ (title "The Lovesong of J. Alfred Prufrock") (poet "T. S. Eliot"))
             (stanza (line "Let us go then, you and I,")
                     (line "When the evening is spread out against the sky")
                     (line "Like a patient etherized upon a table:"))
             (stanza (line "In the room the women come and go") (line "Talking of Michaelangelo."))))
Clone this wiki locally