Xml parser #46

wants to merge 5 commits into


None yet

1 participant


Made some modifications to wax_xml.m. One is to handle properly CDATA tags, and the other for wax.xml.parse() to accept an optional error handler function as its last argument. I explain more in the last two commits of this pull request, which are the ones I'd like you to actually merge in your master branch — if it's ok with you.

christosc added some commits Mar 9, 2011
@christosc christosc Handle comments in XML parsing. f1a7a9d
@christosc christosc Handle comments in XML parsing. 8a908e3
@christosc christosc Merge remote-tracking branch 'upstream/master'
@christosc christosc Handle CDATA tags and accept error handler.
Patch xml parser to handle CDATA tags.
Patch xml parser to accept as its last argument a Lua function to be
used to process a parsing error. This function takes as its only
argument a table with the xml parsing error info in its fields, and
returns no value.  That is, wax.xml.parse() can now be used like this:

wax.xml.parse("...xml string...", function(e)

This error handling function argument is optional, and is expected to be
the last argument of wax.xml.parse().  Explanation about what the error
structure fields mean can be found at

Also with this modification, wax.xml.parse() no longer terminates the
program upon finding a parsing error, as before, but simply returns nil.

Co-authored-by: Manolis Tsangaris <mmt@sinartia.gr>
@christosc christosc Remove conditional inclusion preprocessor directives. 6350610
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment