On Thu, 25 May 2006 19:09:14 +0100, Mark Van Holstyn <[EMAIL PROTECTED]>  
wrote:

> parser=XML::Parser.new
> parser.string= '<root><another_node>hey</another_node></root>'
> doc = parser.parse
>
> Anyone else have an easier way?
>

I tend to use:

        doc = XML::Parser.string(str).parse

(unless the XML is inlined) but obviously that's just a matter of style. A  
few times I've thought we should support a Document.string method, guess  
it's about time I looked into that...

-- 
Ross Bamford - [EMAIL PROTECTED]
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to