Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

unicode char 20 in #PCDATA gives "invalid character" error

843834Jun 25 2001 — edited Jun 26 2001
I want to parse an XML document with a tag that contains a text compressed in a special way. The compression makes characters with unicode values of 20, 1 and even 0 appear. This drives xerces and crimson parsers mad. How can I solve this?

Below is the .xml and the .dtd. To reproduce the error run for example through DOMCounter in the xercesSamples.jar.

XML----------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE IdAndTrajectory SYSTEM "file:/c:/Progress/dtd/IdAndTrajectory.dtd">
<IdAndTrajectory id="abc123">
<InvexorTrajectoryFile>DCL:0005

      ABC123 ? Avtal1 ���K7? 
7  </InvexorTrajectoryFile>
</IdAndTrajectory>
DTD----------
<!ELEMENT IdAndTrajectory (InvexorTrajectoryFile)>
<!ATTLIST IdAndTrajectory id CDATA #REQUIRED>
<!ELEMENT InvexorTrajectoryFile (#PCDATA)> 
Thanks in advance to anyone who is able to help me out with this

/ulrik
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 24 2001
Added on Jun 25 2001
2 comments
343 views