verifying data in an XML document

Discussion in 'XML' started by Joseph Nolting, Oct 10, 2003.

  1. Hi,

    I'm new to XML and I am working on a project where I need to verify
    some of the data in the XML document. The tests I will need to verify
    include: if a certain element exists then this element must exist, or
    whether or not a certain attribute exists and has a value, or simply
    if an element contains text content. My question is, what is the best
    method to go about performing these verifications? Using a schema,
    DTD, XSLT, or some other method?

    Thank you,

    Joseph Nolting
    Joseph Nolting, Oct 10, 2003
    #1
    1. Advertising

  2. DTD is the way to go, it's exactly what it does: validate the format.
    XSLT will only transform the document to HTML, no validation will be made.

    Joseph Nolting wrote:
    > Hi,
    >
    > I'm new to XML and I am working on a project where I need to verify
    > some of the data in the XML document. The tests I will need to verify
    > include: if a certain element exists then this element must exist, or
    > whether or not a certain attribute exists and has a value, or simply
    > if an element contains text content. My question is, what is the best
    > method to go about performing these verifications? Using a schema,
    > DTD, XSLT, or some other method?
    >
    > Thank you,
    >
    > Joseph Nolting
    Louis-Philippe Huberdeau, Oct 13, 2003
    #2
    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. Brian J. Sayatovic
    Replies:
    0
    Views:
    380
    Brian J. Sayatovic
    Feb 10, 2004
  2. Kerry Sanders
    Replies:
    1
    Views:
    741
    apadgett
    Sep 17, 2009
  3. Tony Prichard
    Replies:
    0
    Views:
    706
    Tony Prichard
    Dec 12, 2003
  4. Manish Hatwalne
    Replies:
    1
    Views:
    386
    Martin Honnen
    Jul 13, 2004
  5. Prashanth  Ellina

    Xml writing in Python and verifying using XSD

    Prashanth Ellina, May 27, 2005, in forum: Python
    Replies:
    2
    Views:
    551
    Prashanth Ellina
    May 29, 2005
Loading...

Share This Page