On Thu, Sep 06, 2007 at 07:22:21PM -0300, Bruno Dilly wrote: > Indeed, the rss is not-well-formed. Is it possible to load an external > dtd not included in the rss?
Yes separately to validate a document. See the documentation. What you can't or should NOT try to do is to process something which is not well-formed to make it work if it's not XML. If an RSS feed is broken, DROP IT, then people will fix it ! If you don't I think you make a disservice to the users, and you have no garantee from me that what you did to make it work with libxml2 will continue to work in the future. > For example, can I load > http://my.netscape.com/publish/formats/rss-0.91.dtd before parse the > file? And is possible to load it from a local file? How could I do it? What do you want to do ? You can use a separated DTD to validate an already parsed well-formed XML file. That's possible in the API. What you can't do is to modify the parsing to fake a non-existent DTD. If you want to have the DTD local see the catalog support, there is a page describing it, and it's a standard. http://xmlsoft.org/catalog.html Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
