Solved

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

Posted on 2010-11-08
7
358 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet  URL Rewriting 1 36
Should localization be done inside spring controller 5 26
hibernate jars 4 30
Is there a simpler dropbox system? 10 21
The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

773 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