-
-
Notifications
You must be signed in to change notification settings - Fork 905
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 adds 'default' Namespace to elements #391
Comments
Best. Bug report. Evar. I'll take a look tonight. |
I've stumbled on the same problem using Node#replace nokogiri -vwarnings: [] ruby: Fast & dirty workaround for me was #gsub ;-) |
Workaround was to remove the xmlns attribute in the input file. Or to use the remove_namespaces! method when opening the input file
|
Similar to ac2533, I got around this by adding the node for insertion to a new, temporary Nokogiri doc, then invoked remote_namespaces!. After that I could add the node without the namespaces to the actual destination XML doc. Don't really think this issue should be closed though! :) |
This ticket should NOT have been closed. I've reopened it. |
Any update on this ? |
👍 Any update on this ? @flavorjones |
Confirmed this is still an issue with Nokogiri 1.6.8.rc3. |
Updated example code:
|
I'm still having a problem with this. I will try to isolate and file a separate issue. If there was a way to remove a namespace from a Nokogiri doc, it would be easy to clean up to work around. But while there is an |
@jrochkind , have you filed a separate issue? I've in the similar trouble and trying to find the root of the problem is too old nokogiri or still some workarounds for this issue are needed. |
No, I think I just gave up on my approach, can't recall sorry. |
thanks! still it's helpful info. |
I have a situation where I'm using nokogiri to do the following:
My Ruby code
input file
template file
Actual Output
Expected output
Nokogiri -v
warnings: []
nokogiri: 1.4.4.1
ruby:
version: 1.9.2
platform: i386-mingw32
engine: ruby
libxml:
binding: extension
compiled: 2.7.7
loaded: 2.7.7
The text was updated successfully, but these errors were encountered: