Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Dale Davenport
RE: How can I create new attributes [ reply ]  
2009-03-12 23:39
Thanks, that worked great.

Dale

By: Charlie Savage
RE: How can I create new attributes [ reply ]  
2009-03-12 22:43
See test/tc_attr.rb. Basically:

node = doc.find('/some_node')
attr = XML::Attr.new(node, 'size', '50,000')

By: Dale Davenport
How can I create new attributes [ reply ]  
2009-03-10 23:31
I am creating an XML document from scratch and need to create attributes on some of the nodes. I looked at the API doc and it specifically states that Nodes are not the base type for attributes and points to LibXML::XML::Attribute. There is no such class in the API documents. All I need to know is how to create a new Attribute and attach it to the node.

Thanks
Dale