Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Serialize document with internal DTD using DOMWriter ( Xerces )

Reply
Thread Tools

Serialize document with internal DTD using DOMWriter ( Xerces )

 
 
Simon
Guest
Posts: n/a
 
      07-03-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML document validation using Xerces SAX2XMLReader against external DTD mnshtiwari Software 0 04-14-2009 02:51 PM
How to write XML declaration with DOMWriter class Xerces-c christian.eickhoff@nt.uni-saarland.de XML 3 03-05-2007 09:03 PM
Xerces-C++ serialize Document to XML file kasiviswanath XML 1 08-01-2004 07:37 AM
serialize to SQL Server Blob instead of XML serialize Gordz ASP .Net 3 06-07-2004 07:46 PM
parsing XML to DOM, validating against a local DTD, using Xerces under JAXP? bugbear XML 0 08-28-2003 09:22 AM



Advertisments