Data verification 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. In article <>,
    Joseph Nolting <> wrote:

    % 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.

    Schema was made for these kinds of test. Actually, except for ensuring
    an element has text content, you could do it with a DTD as well.
    To ensure one element exists when another does, you either have to
    ensure that they are adjacent or do a lot of typing.

    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Oct 10, 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. Tony Prichard
    Replies:
    0
    Views:
    730
    Tony Prichard
    Dec 12, 2003
  2. Manish Hatwalne
    Replies:
    1
    Views:
    401
    Martin Honnen
    Jul 13, 2004
  3. Replies:
    4
    Views:
    533
  4. Gelonida N
    Replies:
    3
    Views:
    234
    Gelonida N
    Nov 28, 2011
  5. py
    Replies:
    1
    Views:
    351
Loading...

Share This Page