This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes org.xml.sax.SAXException:  Error while parsing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "org.xml.sax.SAXException:  Error while parsing" Watch "org.xml.sax.SAXException:  Error while parsing" New topic
Author

org.xml.sax.SAXException: Error while parsing

Praveen sdj
Greenhorn

Joined: Apr 03, 2007
Posts: 1
Hi,
I have a problem in parsing xml file using JAXP SAXParser.
I recieve the following error message while parsing Date/number element in my xml file.

ACTIVITY_DATE :2006-08-22
org.xml.sax.SAXException: Error while parsing FinActivityDate 2006-08-
ACTIVITY_DATE: 2006-08-
character array:2006-08-
start position in character array:2040
length:8

In our DTD file we specified the field as (#PCDATA),ByteArrayInputStream is used as inputsource for parse method

parser.parse(new InputSource(new ByteArrayInputStream(responseInBytes)),sAXHandler);

some of the records in xml are parsed successfully but throws SAXException when the buffer size reaches (1024*n) bytes(or chunk of character data)from here it is not able to parse the xml further..what could be the issue.

Any suggestions?
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19719
    
  10

"Praveen sdj", welcome to JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must contain your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names will be deleted.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: org.xml.sax.SAXException: Error while parsing
 
It's not a secret anymore!