Expose line numbers when parsing from string #190

Merged
merged 1 commit into from Mar 11, 2013

Projects

None yet

3 participants

@jmandel

I hope the utility of line numbers for XML elements is non-controversial.

(It would be nice to also include support for the xmlParserOption XML_PARSE_BIG_LINES, but this hasn't made its way to my distro's libxml2 package yet...)

@defunctzombie

@polotek any feedback? looks fine to me.

@jmandel The way forward is to include libxml2 sources with this module. Eventually I will get back to that. Then you won't need to rely on whatever your distro has packaged.

@polotek

This looks fine. Thanks @jmandel. Do you mind sharing your use case with us? We're always curious what prompts these additions to the api.

On an unrelated note, I hate how much boilerplate it takes just to expose a method. Could probably work up a macro for these simple cases. But who has the time for that crap? :)

@jmandel

Sure thing!

The use case is:
http://ccda-scorecard.smartplatforms.org

It's a tool for "scoring" clinical summary documents, determining how well they adhere to a set of best practices. The idea is to give the developers producing these documents good feedback about how to fix them. And being able to include line numbers in the error reports is obviously helpful.

@polotek

Interesting. Thanks.

@defunctzombie defunctzombie merged commit 1d425a5 into libxmljs:master Mar 11, 2013

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment