Documentation
Parses the supplied stream or string into a lisp node tree.
Source
(defun parse (s &key uri-to-package)
"Parses the supplied stream or string into a lisp node tree."
(declare (special uri-to-package))
(let ((*uri-to-package* uri-to-package)
(stream (etypecase s
(string (make-string-input-stream s))
(stream s))))
(declare (special *uri-to-package*))
(handler-bind ((xml-parse-error (lambda (c)
(unless (offset c)
(setf (offset c) (file-position stream))))))
(document (make-state :stream stream)))))Source Context