-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attributes with length 1 are rejected by parser #14
Comments
First, I'd like to thank you for the very detailed bug report (and even digging down to try and find the bug). Second, can you attach the exact XML you are parsing and pertinent parsing code you are testing with -- if the code is all part of a bigger class and would be a pain to refactor out, than just the example XML would be really helpful. |
This is an example XML that produces the problem:
Put it in a file called "badData.xml" and call this:
I get
|
That seems to have fixed it for me. btw this parser is SUPER FAST. I just converted a XOM project to sjxp and (now I got it working) it is TEN TIMES faster. Awesome. You should be screaming this from your front page. "sjxp is F***ing FAST!" I only tried this parser because someone suggested it elsewhere on the net... your front page didn't really give me much idea of the extra speed I would get. btw I also like the API. Nice simple design. |
I really appreciate the kind words! I spent weeks profiling and tuning to make sure the library was painfully fast and created next to no garbage at runtime so it could run non-stop in an server-side process (e.g. an indexer). |
I am parsing XML from OpenStreetMap. It looks like this:
The parser chokes when parsing the "k" attribute.
I set up my rule as:
I get
I think this is a simple "off by 1" error.
XMLParser.java at line 713 should be:
I am using the current stable version (2.2)
The text was updated successfully, but these errors were encountered: