Solved

Stax XML EventReader: What portion of data is returned when parsing large data element

Posted on 2010-11-08
7
353 Views
Last Modified: 2012-05-10
We have a very large content of one data element (over 1000 000 of strings). When we parse with stax we HARACTER event is triggered so that normall around 12 strings  are returned by one event, so we assumed first, there is some parse buffer length there.
Then,  we saw around 6 exceptuions of this rule.
We played around if that might be due to specific data and whitespaces but XML is generated automatically and after removing certin portions the problem appeared elsewhere at parsing

The question is: if stax event parses is faced to large contents what triggers the event and what portion of text we may expect in the returned characters ?
0
Comment
Question by:glemaire2004
  • 3
  • 2
  • 2
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Which implementation of stax are you using?
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
Comment Utility
Incidentally, afaik in no implementation of sax or stax is it guaranteed that all the expected text in a characters event will be returned in one call. It's up to the reader to buffer and collect content returned by characters
0
 
LVL 92

Assisted Solution

by:objects
objects earned 250 total points
Comment Utility
you can't control the where the break occurs but you can stop it occurring

http://helpdesk.objects.com.au/java/stop-stax-breaking-character-event
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 92

Expert Comment

by:objects
Comment Utility
another alternative would be to use the cursor api
0
 

Author Comment

by:glemaire2004
Comment Utility
0
 

Author Comment

by:glemaire2004
Comment Utility
The link above match my question best. The answer there was somethink that I googled on another article.
Does anyone has toher idea if we can control the size of the text read by one event?
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>>Does anyone has toher idea if we can control the size of the text read by one event?

Again, what implementation of stax are you using?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now