sparklemotion/nokogiri

JRuby Builder throws namespace error when creating a node with a non-default namespace

Open

#1,854 建立於 2019年1月8日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)Ruby (5,615 star) (806 fork)batch import
help wantedplatform/jrubytopic/buildertopic/namespaces

描述

If you're having trouble installing Nokogiri ...

Have you tried following the installation tutorial?

What is the output of gem install?

What are the contents of the mkmf.log file?

What operating system are you using? win10 jruby9.1.13

If this isn't an installation issue ...

What problems are you experiencing?

NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.

What's the output from nokogiri -v? 1.10.0 (same problem with 1.9.1) Can you provide a self-contained script that reproduces what you're seeing? using gem AllureRubyAdaptorApi it use nokogiri

in the line : https://github.com/sparklemotion/nokogiri/blob/master/lib/nokogiri/xml/document.rb#L89

def create_element name, *args, &block
        elm = Nokogiri::XML::Element.new(name, self, &block)
        args.each do |arg|

get error just like Nokogiri::XML::Element.new('abc:def',self,&block)

the allure api gem usage is just like ::

https://github.com/allure-framework/allure-ruby-commons/blob/master/lib/allure-ruby-adaptor-api/builder.rb#L126

is that another way to create a xml node with name "ns2:test-suite"

貢獻者指南