-
-
Notifications
You must be signed in to change notification settings - Fork 897
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
Nokogiri::XML::Reader#encoding and Nokogiri::XML::Reader#xml_version giving wrong output #980
Comments
@loveGitHub Hi I just attempted the above example with Nokogiri 1.5.6 "reader.instance_of? Nokogiri::XML::Reader" gave me "false". |
@loveGitHub Please update this with an accurate example. In your code, you're clearly creating a new String and nowhere in there are you creating any Nokogiri related objects |
@leejarvis That was a typo..
|
@loveGitHub @leejarvis I think the encoding, xml_version info needs to be provided or parsed from the "source". I think a slight change in constructor code would be required to fix this. (lib/nokogiri/xml/reader.rb)
Let me know how this sounds. |
Hi, apologies for not responding on this issue for such an embarrassingly long time. The p reader.read.xml_version # => "1.0" reader.each do |node|
p node.xml_version # => "1.0"
end As for |
PR #2377 has been created to improve the behavior of |
Hi,
I tried below code :
The text was updated successfully, but these errors were encountered: