Nokogiri::XML::AttributeDecl methods output understanding


Today morning my target is going through the Nokogiri::XML::AttributeDecl methods. So I wrote some simple codes to
understand these methods:

require ‘nokogiri’

doc = # =>
#<Nokogiri::XML::Document:0x44a5070 name=“document”>

attdcl =‘bar’,doc) # =>
#<Nokogiri::XML::AttributeDecl:0x449d0dc “”>
attdcl.enumeration # => []
attdcl.attribute_type # => 0
attdcl.default # => nil

Now my questions are below :

(a) why does attdcl.enumeration give empty array? What I need to
change to get an non-empty array?
(b) why does attdcl.default give nil? What I need to change to get
an non-nil value?


Hi, I hope the attached code explain all to you.

Eduardo Figarola.

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