java - How can I transform input stream when I'm using stax2 XMLInputFactory2? -


parsing big xml files (500 - 800mb) using stax2 that:

xmlstreamreader2 reader = (xmlstreamreader2) xmlif2.createxmlstreamreader(filename, new fileinputstream(filename)); 

to convert specific csv , have next problem. text nodes contains "" sequence. in output file have replaced cyrillic letter "Ё". when parser found sequence "", it's throw exception:

[com.ctc.wstx.exc.wstxlazyexception] com.ctc.wstx.exc.wstxparsingexception: illegal character entity: expansion character (code 0x1 @ [row,col,system-id]

in stax have same exception.

can set transforation xml stream reader , replace  Ё automative while parsing??? can create intermediate file, replaced, , parse it, it's not idea

error message indicates xml not well-formed: either encoding broken. sounds contains entity reference unicode character value 0x1. not allowed xml 1.0; although legal xml 1.1. perhaps xml document not declare "version='1.0'" in xml declaration?


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -