Validating XML against a DTD that is not supplied in the XML Schema

B

Ben Jessel

Hi,

I'm talking the problem of trying to validate whether a rss xml feed
is well formed - i.e corresponds to the DTD and xml schema
definitions.

Given that rss comes in a number of forms:

* Sometimes a DTD is referenced
* Sometimes a schema is referenced, with namespaces
* Most of the time, no DTD or schemas or namespaces are defined.

My application requires to know whether an rss feed supplied is valid
as there is processing on the data that occurs later.

My orignal tack was to parse the data into objects ( via RSSDigester )
and then apply business logic.

However, given that functionality ( by way of DTDs and schemas )
already exists, it seems pointless to re-invent the wheel. However, my
problem is

* I can't find a library that will let me supply an XML document and a
URL to a DTD/schema which would then validate the XML.
* Even if I wrote the DTD declaration inline on the fly to the
recieved XML, given all the possible variations eg, DTD/Schema/none
specified (above), I doubt that it work.

Can anyone suggest what to do?

Regards,

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top