  | |  | Problem in Saving XML file with DTD | Problem in Saving XML file with DTD 2003-10-03 - By SHAY
Hello, I built a simple application that parses an XML document (using JAXP1.2), modifies it using DOM and saves the changes. After this process is completed the file includes everything but the DTD. I should mention that I'm using the Transformator in order to write the DOM document to a file, but it seems to skip the DTD section when writing the new updated XML file. Why is it happening and how can I keep the DTD?? Thanks Shay.
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas -microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="cid:filelist.xml@(protected)"> <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:DoNotRelyOnCSS/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:DocumentKind>DocumentEmail</w:DocumentKind> <w:EnvelopeVis/> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:ApplyBreakingRules/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; text-align:right; mso-pagination:widow-orphan; direction:rtl; unicode-bidi:embed; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-bidi-language:HE;} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} span.EmailStyle17 {mso-style-type:personal-compose; mso-style-noshow:yes; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:Arial; mso-ascii-font-family:Arial; mso-hansi-font-family:Arial; mso-bidi-font-family:Arial; color:windowtext;} @(protected) Section1 {size:595.3pt 841.9pt; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0; mso-gutter-direction:rtl;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--> </head>
<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
<div class=Section1 dir=RTL>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Hello ,<o:p></o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>I built a simple application that parses an XML document (using JAXP1.2), modifies it using DOM and saves the changes.<o:p></o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>After this process is completed the file includes everything <b><u><span style='font-weight:bold'>but</span></u></b> the DTD.<o:p></o:p></span></font>< /p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>I should mention that I'm using the Transformator in order to write the DOM document to a file, but it seems to skip the DTD section when writing the new updated XML file.<o:p></o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Why is it happening and how can I keep the DTD??<o:p></o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Thanks <o:p></o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal dir=LTR style='text-align:left;direction:ltr;unicode-bidi: embed'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Shay. <o:p></o:p></span></font></p>
<p class=MsoNormal dir=RTL><font size=2 face=Arial><span dir=LTR style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
</div>
</body>
</html>
|
|
 |