Re: [libxml-devel] entity encoding

2009-08-29 Thread Andrew Hume
well, its up to teh API designer of course, but i find the asymmetry of teh interface odd. nevertheless, if it is our duty to encode before assigning, what routine do we use? On Aug 28, 2009, at 12:45 PM, Sean Chittenden wrote: node.content returns a string, which is 'AT&T' iirc, you want to

Re: [libxml-devel] entity encoding

2009-08-28 Thread Sean Chittenden
node.content returns a string, which is 'AT&T' iirc, you want to assign a node, not the content of a node. I believe it's quite deliberate that it doesn't escape string input (try and construct an HTML or RSS feed). It's easier to escape on assign than have a magic escape in these situat

[libxml-devel] entity encoding

2009-08-28 Thread Andrew Hume
xml: AT&T i parse this using doc = LibXML::XML::Document.file('foo.xml') if node points to this element, then node.content == 'AT&T' all well and good. if i want to now create a new document, then i do newnode = LibXML::XML::Node.new('Company') newn