?
Solved

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

Posted on 2010-11-08
7
Medium Priority
?
367 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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 1000 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 92

Expert Comment

by:objects
ID: 34088897
another alternative would be to use the cursor api
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
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 video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

752 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