On Dec 12, 2007 10:54 AM, xunamua <parthajitbaruah@...> wrote:
Hi,
I hope this post is relevant to this forum.
I'm using Sun's implementation of StAX parser to parse some large xml
files. The file size is about 1.5MB. I'm using the XMLEventReader
interface to parse xmls which consists of many elements like these.
The SCRIPT element contains sql queries which can be very large at times.
The problem I'm facing is that at times the character event returns me
only a part of the text in the SCRIPT element. It happens if there are
spaces and newlines. If the text changes by a single character ( add
or remove a character somewhere ), it starts working fine.
This looks like a general XML parsing problem or it might be something
related to the stax parser. Is there any limit to how many characters
the character event can have at a time ?
Any thoughts on this is highly appreciated.
hi Sam,
in contrast o XmlPull API in STAX there is no requirement to retrn all text inside element in one event instead youmay get multiple - just modify your code to expect it.
HTH,
Alek
<BUILD VERSION="2250.0000">
<CHANGE NUMBER="0">
<SCRIPT>
<![CDATA[
ALTER TABLE INVOICE ALTER COLUMN
INVOICE_SOLD_TO_PUB_X_REF NVARCHAR(40) NULL
;
]]>
</SCRIPT>
</CHANGE>
<CHANGE NUMBER="1">
</CHANGE>
</BUILD>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/xmlpull-user/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/xmlpull-user/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:xmlpull-user-digest@yahoogroups.com
mailto:xmlpull-user-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
xmlpull-user-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
<BUILD VERSION="2250.0000">
<CHANGE NUMBER="0">
<SCRIPT>
<![CDATA[
ALTER TABLE INVOICE ALTER COLUMN
INVOICE_SOLD_TO_PUB_X_REF NVARCHAR(40) NULL
;
]]>
</SCRIPT>
</CHANGE>
<CHANGE NUMBER="1">
</CHANGE>
</BUILD>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/xmlpull-user/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/xmlpull-user/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:xmlpull-user-digest@yahoogroups.com
mailto:xmlpull-user-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
xmlpull-user-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
--
The best way to predict the future is to invent it - Alan Kay