[libxml-devel] Validating xml in a string

Charlie Savage cfis at savagexi.com
Tue Jul 1 02:23:45 EDT 2008


> I have the same problem as dwTwiLighT, even, when i use parse method
> before.
=

>>> I want to check if xml received by my application (made with RoR and
>>> libxml-ruby) via POST request is well-formed.
>>> This is the source code of that part:
>>>        p = XML::Parser.new
>>>        p.string = params[:xml]
>>>        if p.context.well_formed?
>>>          doc = p.parse


Despite the documentation, its actually p.parser_context and not 
p.context.  I've updated the svn code to go with parser.context for the 
next release.

Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://rubyforge.org/pipermail/libxml-devel/attachments/20080701/39b369c9/attachment.bin>


More information about the libxml-devel mailing list