Serialize document with internal DTD using DOMWriter ( Xerces )

Discussion in 'XML' started by Simon, Jul 3, 2003.

  1. Simon

    Simon Guest

    Hi,

    I'm trying to serialize an XML document to a file using XERCES-C++
    2.1.0 . The Document contains an internal DTD.

    The DTD contains some elements with default values like the following
    snippet:

    <!ELEMENT SFLOPTRECPATTERN (#PCDATA)>
    <!ATTLIST SFLOPTRECPATTERN
    string CDATA "&quot;&quot; &quot;/&quot; &quot;-&quot; 0 9"
    >


    ....and the document contains some elements like this one:

    <SFLOPTRECPATTERN string="&quot;&quot; &quot;/&quot; &quot;-&quot; 0
    9"/>

    My problem is:

    when I parse the file, and later try to serialize it with DOMWriter's
    writeToString-method, it breaks my internal DTD.
    The above snippet will now look like this ( later resulting in a
    parser error ),

    <!ELEMENT SFLOPTRECPATTERN (#PCDATA)>
    <!ATTLIST SFLOPTRECPATTERN
    string CDATA """ "/" "-" 0 9"
    >


    while the corresponding element still remains correct:

    <SFLOPTRECPATTERN string="&quot;&quot; &quot;/&quot; &quot;-&quot; 0
    9"/>

    Can anyone tell me, how I could prevent DOMWriter from changing my
    &quot; to " in a DTD?

    Regards,

    Simon
     
    Simon, Jul 3, 2003
    #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. Gordz
    Replies:
    3
    Views:
    3,985
    John Oakes
    Jun 7, 2004
  2. Joseph Tilian
    Replies:
    0
    Views:
    376
    Joseph Tilian
    Dec 21, 2004
  3. bugbear
    Replies:
    0
    Views:
    1,067
    bugbear
    Aug 28, 2003
  4. kasiviswanath
    Replies:
    1
    Views:
    795
    Keith M. Corbett
    Aug 1, 2004
  5. -saarland.de
    Replies:
    3
    Views:
    1,594
    spiff
    Mar 5, 2007
Loading...

Share This Page