[s-xml-devel] Error reading a processing instruction

L Sarasua leosarasua at gmail.com
Sat Nov 17 11:23:02 UTC 2012


Hi,

I think there is a bug in s-xml. When parsing an xml file with the
following processing instruction:

<?detailed-description description="Detailed Description" end="tail"?>

the program throws an error.

*** - XML parser expected = near stream position 150948.

I patched it up and it seems to work, by changing the 5th line of
parse-xml-element as follows:

(defun parse-xml-element (stream state)
  "Parse and return an XML element from stream, positioned after the
opening '<'"
  (declare (special *namespaces*))
  ;; opening < has been read
  (when (member (peek-char nil stream nil nil) '(#\! #\?))
...


Cheers,

Leo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/s-xml-devel/attachments/20121117/ba775fd1/attachment.html>


More information about the s-xml-devel mailing list