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

Discussion in 'Java' started by Ben Jessel, Aug 5, 2004.

  1. Ben Jessel

    Ben Jessel Guest

    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
     
    Ben Jessel, Aug 5, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. simon ames
    Replies:
    1
    Views:
    512
    Joerg Jooss
    Apr 11, 2004
  2. Mike P
    Replies:
    1
    Views:
    361
    Mike P
    Dec 6, 2004
  3. Stefan Ram

    Validating a DOM against a DTD?

    Stefan Ram, Jul 25, 2004, in forum: Java
    Replies:
    0
    Views:
    464
    Stefan Ram
    Jul 25, 2004
  4. bugbear
    Replies:
    0
    Views:
    1,042
    bugbear
    Aug 28, 2003
  5. First_step_to_xml
    Replies:
    0
    Views:
    715
    First_step_to_xml
    Jun 28, 2006
Loading...

Share This Page