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

RE: CDATA processing problem using Xerces-J validating parser

  • To: "Tony Opatha" <tonyopatha@y...>,<xml-dev@l...>
  • Subject: RE: CDATA processing problem using Xerces-J validating parser
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Wed, 18 Jun 2003 21:57:55 -0700
  • Thread-index: AcM2Hvsu+/46+ohaRm2fbLsUD44iigAAF1Ra
  • Thread-topic: CDATA processing problem using Xerces-J validating parser

xerces cdata
It is a common misconception that information within a CDATA section is not processed by the XML parser but instead is skipped. Unfortunately this is incorrect. CDATA sections are at best a shorthand mechanism that prevents having to escape certain characters not a directive to the XML parser to halt processing until further notice. 

________________________________

From: Tony Opatha [mailto:tonyopatha@y...]
Sent: Wed 6/18/2003 9:54 PM
To: xml-dev@l...
Subject:  CDATA processing problem using Xerces-J validating parser


I have a XML doc instance that contains CDATA section:
"<![CDATA[" and ends with "]]>"
 
Parsers validating this XML are supposed to ignore the
CDATA. XML Spy validates the XML instance fine using
its corresponding XSD which defines the CDATA as
a xsd:string.
 
Now when I use in run-time Xeres-J parser it seems to
be processing the CDATA and obviously fails to
validate the CDATA section since it has all types of
illegal characters in it:
 
Here is the error I get:
 
org.xml.sax.SAXException: Data not belonging to any element encountered: 32.com Record
 
Any ideas why this is a problem.
 
I believe this may be a Xerces 1.4 parser. Does xerces support
correct handling of CDATA???

thanks
 
 
 

________________________________

Do you Yahoo!?
SBC Yahoo! DSL <http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/>  - Now only $29.95 per month!

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.