[gambit-list] Speed on XML-parsing
Hans Petter Egesund
petter.egesund at gmail.com
Sat Aug 16 09:11:35 EDT 2008
Yes, this is right.
Strange enough ssax gives me a warning on my valid (?!) xml-file. No
other parsers complains, neither do xmllint.
Petter
Den 16. aug. 2008 kl. 14.33 skrev Mikael More:
> 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
>
> _______________________________________________
> 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/ca1eb588/attachment.htm>
More information about the Gambit-list
mailing list