On this page:
ssax: xml->sxml

2 SAX Parsing

(ssax:xml->sxml port    
  namespace-prefix-assig)  sxml?
  port : input-port?
  namespace-prefix-assig : (listof (cons/c symbol? string?))
Reads an XML document (which can be a single XML element) from port, and returns the corresponding SXML (top) representation. The namespace-prefix-assig association list provides shortened forms to be used in place of namespaces.

Examples:

> (ssax:xml->sxml
   (open-input-string
    "<zippy><pippy pigtails=\"2\">ab</pippy>cd</zippy>")
   '())

'(*TOP* (zippy (pippy (@ (pigtails "2")) "ab") "cd"))

> (ssax:xml->sxml
    (open-input-string
     "<car xmlns=\"vehicles\"><wheels>4</wheels></car>")
    '())

'(*TOP* (vehicles:car (vehicles:wheels "4")))

> (ssax:xml->sxml
    (open-input-string
     "<car xmlns=\"vehicles\"><wheels>4</wheels></car>")
    '((v . "vehicles")))

'(*TOP* (@ (*NAMESPACES* (v "vehicles"))) (v:car (v:wheels "4")))