[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Usage of Escape Character instead of CDATA

  • To: xml-dev@l...
  • Subject: Usage of Escape Character instead of CDATA
  • From: ReemaD@r...
  • Date: Fri, 1 Feb 2002 15:59:07 +0530

xml escape character
Hi All,

     We all know that we validate our XML document with DTD. But the
problem that i'm facing is:

DTD is allowing certain tags that are not earlier specified in DTD. I am
not even using CDATA section that means the tags not specified in DTD are
also getting parsed.

For example:
File name: Untitled1.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Reema Duggal
(RMSI) -->
<!DOCTYPE root SYSTEM "Untitled2.dtd">
<root>
  <testnode>
    &lt;testnode1/&gt;
  </testnode>
</root>

DTD used: Untitled2.dtd
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Reema Duggal
(RMSI) -->
<!--DTD generated by XML Spy v4.2 U (http://www.xmlspy.com)-->
<!ELEMENT root (testnode)>
<!ELEMENT testnode (#PCDATA)>

So instead of specifying tags like this: <testnode1>, if we write
&lt;testnode1&gt; then the XML file gets validated without giving any
errors. But "testnode1" element is not specified in DTD.

How can this be possible?? Why the DTD is not validating it??

Waiting for reply..

Regards,
Reema Duggal
Software Engineer ( Software )
NewMedia
RMSI
A-7 Sector - 16
Noida-201 301 India
Tel : (91)-118-451-1102-2302
Fax: (91)-118-451-1109, 0963
E-mail: reemad@r...
web : www.rmsinet.com


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.