Re: [xml] XML::LibXML not returning DTD validation errors



Matt,

First, your version of XML::LibXML binding is obsolete. So, if you
come to problems, try using latest XML::LibXML from CPAN (now 1.50).

Second, is_valid only returns 0/1 status. However, there is validate()
which croaks the error message on invalid document. So, you simply use
eval { $doc->validate() }; and read the error message from $  

Third, there is XML::LibXML oriented mailing list at
perl-xml listserv ActiveState com

Regards,

-- Petr Pajas

"MattO" <matto tellme com> writes:

I'm using Perl binding to XML::LibXML 0.99 on Solaris.

XML::LibXML is parsing my XML doc and an externally referenced DTD.

+ If the XML doc contains an error, it spits out the error to the console.
+ If the DTD contains an error, it does the same.
- If the XML doesn't conform to the DTD, the is_valid method returns 0, but
I'm not sure how to get at descriptive error text.

Can you help?

Thanks.

Matt

p.s. I'm not on this list (yet), so please include my email address in your
reply.

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml


-- 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]