File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes escape special characters in parser's input Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "escape special characters in parser Watch "escape special characters in parser New topic
Author

escape special characters in parser's input

Mike Ottinger
Ranch Hand

Joined: Jan 11, 2002
Posts: 125
I hope this is the appropriate forum for this. I'm using jakarta Digester to parse an xml file coming from a backend system. It's going to be large and it contains in some of the xml values brackets and other things that confuse parsers. Is there anyway, either in Digester or in the XSD definition I'm making to describe this data, that I can make the parser ignore characters such as this? I'm looking at solutions that I can do on my end, rather than with the backend, they're fairly limited in what they can do. If I'm not mistaken, dtds have the ability of declaring elements with CDATA which told the parser to ignore the value and continue on. Is there something equivalent with XSDs? Thanks in advance.

- M


SCJP 1.4 SCJD 1.5
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
I'm sorry. I can't answer your question. I haven't used Digester. However, I noticed that some people in the XML and Related Technologies have talked about it, and also some people in the Other Open Source Projects forum.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: escape special characters in parser's input
 
Similar Threads
How to parse special charcacters(&)
Problem of 'XmlPullParserException'
SAX parser's characters[] method and "\n" problem
Unicode parsing exception
using CDATA with XSDs