Solved

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

Posted on 2010-11-08
7
362 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
ID: 34084348
Which implementation of stax are you using?
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 34084442
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
ID: 34088892
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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
LVL 92

Expert Comment

by:objects
ID: 34088897
another alternative would be to use the cursor api
0
 

Author Comment

by:glemaire2004
ID: 34089029
0
 

Author Comment

by:glemaire2004
ID: 34089043
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
ID: 34089388
>>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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C# XML Get Values 4 37
Java array 10 68
Html split(text) 2 33
Java List 4 45
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
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:

696 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