[gambit-list] Speed on XML-parsing

Mikael More mikael.more at gmail.com
Sat Aug 16 08:33:15 EDT 2008


That is both correct and not correct. It uses input-port-byte-position when
generating an error response, not otherwise. It typically passes you errors
in case you fed the deserializer with invalid XML. Here's an utility
function to deserialize an XML string into SXML.

(define readxml (lambda (#!optional (namespace-prefix-assig "")) (lambda
(port) (ssax:xml->sxml port namespace-prefix-assig))))

(define (xml-string->sxml s #!optional (namespace-prefix-assig ""))
  (call-with-input-string s (readxml namespace-prefix-assig)))

Though, I do admit that it would be nice if someone fixed SSAX-SXML in this
respect.

M

2008/8/16 Hans Petter Egesund <petter.egesund at gmail.com>

> Hi, more on slow xml...
>
> I can't get ssax to parse from a string, it seems the library is
> using input-port-byte-position which needs a device input port. So
> the attempt so slurp the file into memory, and then do the parsing
> ends here?!
>
> I will tell if I come up with something interesting.
>
> Petter
>
>
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20080816/cef1f503/attachment.htm>


More information about the Gambit-list mailing list