spring batch - getting exception while parsing xml with out root element -
i parsing(reading) xml file(without root tag) has multiple records through spring batch, throwing error. works fine root tag want parse without root tag.
below exception:
caused by: javax.xml.stream.xmlstreamexception: parseerror @ [row,col]:[640,2] message: markup in document following root element must well-formed. @ com.sun.org.apache.xerces.internal.impl.xmlstreamreaderimpl.next(xmlstreamreaderimpl.java:601) @ com.sun.xml.internal.stream.xmleventreaderimpl.peek(xmleventreaderimpl.java:276) @ org.springframework.batch.item.xml.stax.defaultfragmenteventreader.nextevent(defaultfragmenteventreader.java:114) @ org.springframework.batch.item.xml.stax.defaultfragmenteventreader.markfragmentprocessed(defaultfragmenteventreader.java:184) ... 33 more
and fragmentrootelementname rtt
<property name="fragmentrootelementname" value="rtt" />
below xml syntax:
<rtt> <tranaction> </transaction> <data></date> </rtt> <rtt> <tranaction> </transaction> <data></date> </rtt> <rtt> <tranaction> </transaction> <data></date> </rtt>
it works fine if put in root element :
<rttdata> <rtt></rtt><rtt></rtt> <rtt></rtt> <rtt></rtt></rttdate>
Comments
Post a Comment