BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 09-11-2009, 12:05 AM   #1 (permalink)
New Member
Join Date: Sep 2009
Model: 6330
Carrier: at&t
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default XMLWriter throws ArrayIndexOutOfBoundsException

Please Login to Remove!


I'm using DOMInternalRepresentation.parse with an XMLWriter to produce a string representation of a DOM XML tree.

On the BB 8330 simulator, the string output code runs smoothly until I modify my DOM tree by setting a prefix on an element node (e.g. node.setPrefix("foo"), so I get an element that looks like this: <foo:name>...). At that point, running the string output routine (again DOMInternalRepresentation.parse with an XMLWriter) gives me an "ArrayIndexOutOfBoundsException: -1 < 0". I'm assuming the problem is in the XMLWriter, or less likely, in the DOMInternalRepresentation. It's quite possible that I'm misusing the API.

I would appreciate any help you could provide with this.

Old 09-11-2009, 12:11 AM   #2 (permalink)
BBF Spam Killer Moderator
daphne's Avatar
Join Date: May 2007
Location: on a sunny beach
Model: Paspt
Carrier: VZW but not for long
Posts: 9,176
Post Thanks: 120
Thanked 147 Times in 116 Posts

Moved to Developer Forum
Report spam text messages to 7726
#BlackBerry by choice

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.