Skip to content
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

XML file not fully parsed with JRuby #748

Closed
jmcnevin opened this issue Aug 15, 2012 · 1 comment
Closed

XML file not fully parsed with JRuby #748

jmcnevin opened this issue Aug 15, 2012 · 1 comment

Comments

@jmcnevin
Copy link

Not really sure what's happening here, but I'm attempting to load the following file into an XML document:

http://wpcandy.s3.amazonaws.com/resources/postsxml.zip

xml = Nokogiri::XML(File.open(FILENAME))

Under JRuby, it doesn't appear that the file is fully parsed...

CRuby:

xml.xpath("//item").size # => 54 (correct)

JRuby:

xml.xpath("//item").size # => 1 (wut)

Also, calling xml.to_s on JRuby shows that the in-memory Nokogiri document is ending after the first item node.

@jvshahid
Copy link
Member

It turns out that the problem was due to a miss configuration of the dom parser, which caused the parser to stop after detecting that a namespace wasn't declared. I pushed a fix and a test case (a simpler version of your test case).

@yokolet can you update the changelogs :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants