LibXMLJRuby is not missing constant XML!

Hi,

anyone have the solution for this problem?

I have gem RXSD and it need libxml-jruby. This works with ruby but with
jruby gives an error :

ArgumentError (LibXMLJRuby is not missing constant XML!):
libxml-jruby (1.0.0) lib/libxml-jruby/xml/parser.rb:103:in
parse_string' libxml-jruby (1.0.0) lib/libxml-jruby/xml/parser.rb:71:inparse’
libxml-jruby (1.0.0) lib/libxml-jruby/xml/document.rb:10:in string' app/models/voucher.rb:7 app/models/voucher.rb:454:inload’
app/controllers/vouchers_controller.rb:5:in `index’

Code :

schema = RXSD::Parser.parse_xsd :uri => xsd_uri

Note: the point is to generate jruby class from xsd and fill with data
from xml.

thanks in advance

Guilherme Pereira wrote:

Hi,

anyone have the solution for this problem?

I have gem RXSD and it need libxml-jruby. This works with ruby but with
jruby gives an error :

ArgumentError (LibXMLJRuby is not missing constant XML!):
libxml-jruby (1.0.0) lib/libxml-jruby/xml/parser.rb:103:in
parse_string' libxml-jruby (1.0.0) lib/libxml-jruby/xml/parser.rb:71:inparse’
libxml-jruby (1.0.0) lib/libxml-jruby/xml/document.rb:10:in string' app/models/voucher.rb:7 app/models/voucher.rb:454:inload’
app/controllers/vouchers_controller.rb:5:in `index’

Code :

schema = RXSD::Parser.parse_xsd :uri => xsd_uri

Note: the point is to generate jruby class from xsd and fill with data
from xml.

thanks in advance

Hi again,

I correct the file “parser.rb” from libxml-jruby :

previous code: “LibXMLJRuby::XML::Parser”

for this one :

“module LibXMLJRuby
module XML
class Parser”

But it don’t give me chance to use gem RXSD because needs methods that
are not implemented in libxml-jruby gem. like this one :

undefined method `to_h’ for #LibXMLJRuby::XML::Attributes:0xe916a1

maybe in future someone make better libxml for jruby.

cheers and thank u all

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs