We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This works:
doc = Nokogiri::XML("<element><child xmlns="woop:de:doo" /></element>") doc.at("//xmlns:child", 'xmlns' => 'woop:de:doo') #=> <child xmlns="woop:de:doo" />
This doesn't:
doc = Nokogiri::XML::Document.new e = Nokogiri::XML::Node.new('element', doc) c = Nokogiri::XML::Node.new('child', doc) c.add_namespace(nil, 'woop:de:doo') e.add_child(c) doc.add_child(c) doc.at("//xmlns:child", 'xmlns' => 'woop:de:doo') #=> nil
The text was updated successfully, but these errors were encountered:
I'd also like to add that if you have a document like this:
<element> <c1 xmlns="one" /> <c2 xmlns="two" /> </element>
then
doc.root.collect_namespaces.inspect #=> {'xmlns' => 'two'}
Sorry, something went wrong.
Yup. That is the danger of collect_namespaces. I think that method should be removed.
The first problem is fixed here: c6e5fa0
Fix #134
ff7cd16
No branches or pull requests
This works:
This doesn't:
The text was updated successfully, but these errors were encountered: