[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

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

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
glemaire2004
Asked:
glemaire2004
  • 3
  • 2
  • 2
2 Solutions
 
CEHJCommented:
Which implementation of stax are you using?
0
 
CEHJCommented:
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
 
objectsCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
objectsCommented:
another alternative would be to use the cursor api
0
 
glemaire2004Author Commented:
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
 
CEHJCommented:
>>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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now