Xerces C++: create XML according to XSD

Discussion in 'XML' started by Gregory, Apr 15, 2005.

  1. Gregory

    Gregory Guest

    Hi everyone.
    I would like to create XML string or file according to a Schema (the
    DOMWriter to output the XML string according to a Schema).
    Does anyone know how to do that?

    example:

    DOMWriter *theSerializer =
    ((DOMImplementationLS*)impl)->createDOMWriter();
    XMLFormatTarget myFormTarget = new LocalFileFormatTarget(outputFile);
    DOMNode *docToWrite = doc;
    if ( theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint,
    true) )
    theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
    theSerializer->writeNode(myFormTarget ,*docToWrite);

    Somewhere along the line I would like to set a schema location that
    the
    output has to obey. How can I add a schema location (preferably a
    local one).

    Thanks in advance
     
    Gregory, Apr 15, 2005
    #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. Jens M. Felderhoff

    Re: validate xml against xsd, xerces

    Jens M. Felderhoff, Jul 11, 2003, in forum: XML
    Replies:
    0
    Views:
    2,501
    Jens M. Felderhoff
    Jul 11, 2003
  2. Yona
    Replies:
    0
    Views:
    552
  3. cvissy
    Replies:
    0
    Views:
    609
    cvissy
    Nov 16, 2004
  4. -saarland.de
    Replies:
    8
    Views:
    1,769
    naivexml
    May 16, 2011
  5. naivexml
    Replies:
    0
    Views:
    2,480
    naivexml
    May 16, 2011
Loading...

Share This Page