Hi,  I'm using libxml-ruby in my app, and there's a point where I need to loop through all the attributes in a particular element node.  I've tried the following (assuming I have the correct node object called "node"):

node.properties.each do |attr|
  puts "#{attr.name} = {attr.value}"
end

For some reason, this only outputs the first attribute.  The node definately has more attribtues -- I can access them using   node["theattribute"] .

What is the correct way to loop through the attributes?  Is there something wrong w/ my installation?  A bug?




_______________________________________________
libxml-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to