Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

XML file not fully parsed with JRuby #748

Closed
jmcnevin opened this Issue · 1 comment

2 participants

@jmcnevin

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
Owner

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 :)

@jvshahid jvshahid closed this
@benlangfeld benlangfeld referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.