Want to Validate a DOM Tree Against a Schema - Xerces C/C++

Discussion in 'XML' started by Novitas, Sep 14, 2005.

  1. Novitas

    Novitas Guest

    I would like to perform a schema validation of a DOM tree that is
    already assembled in memory with as little fuss and setup as possible.

    I see support in the Xerces documentation to perform validation with
    DOMBuilder and XercesDOMParser. There is also an interface class
    called XMLValidator, but it is not clear to me how I might use these
    resources to achieve what I described above. Any help getting started
    in the right direction would be greatly appreciated.

    Thanks in advance
     
    Novitas, Sep 14, 2005
    #1
    1. Advertising

  2. Novitas

    Ian Pilcher Guest

    Novitas wrote:
    > I would like to perform a schema validation of a DOM tree that is
    > already assembled in memory with as little fuss and setup as possible.
    >
    > I see support in the Xerces documentation to perform validation with
    > DOMBuilder and XercesDOMParser. There is also an interface class
    > called XMLValidator, but it is not clear to me how I might use these
    > resources to achieve what I described above. Any help getting started
    > in the right direction would be greatly appreciated.
    >


    In Java, one uses a SchemaFactory to create a Schema, and then one uses
    that schema to create a Validator. Finally, a DOMSource is created from
    the DOM tree and passed to the Validator.

    I'm not sure how much of this will translate to C/C++, but it might get
    you started in the right direction.

    HTH

    --
    ========================================================================
    Ian Pilcher
    ========================================================================
     
    Ian Pilcher, Sep 14, 2005
    #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. =?ISO-8859-1?Q?Antonio_Ruiz_Mart=EDnez?=

    validate a document or element against a schema

    =?ISO-8859-1?Q?Antonio_Ruiz_Mart=EDnez?=, Jan 13, 2005, in forum: Java
    Replies:
    0
    Views:
    318
    =?ISO-8859-1?Q?Antonio_Ruiz_Mart=EDnez?=
    Jan 13, 2005
  2. Jens M. Felderhoff

    Re: validate xml against xsd, xerces

    Jens M. Felderhoff, Jul 11, 2003, in forum: XML
    Replies:
    0
    Views:
    2,502
    Jens M. Felderhoff
    Jul 11, 2003
  3. bugbear
    Replies:
    0
    Views:
    1,019
    bugbear
    Aug 28, 2003
  4. -saarland.de
    Replies:
    8
    Views:
    1,772
    naivexml
    May 16, 2011
  5. naivexml
    Replies:
    0
    Views:
    2,485
    naivexml
    May 16, 2011
Loading...

Share This Page