-
May 17th, 2010, 11:56 PM
#1
Reading from XMl using Itemreader
Hi,
I am using staxeventitemreader to read fragments from xml and then converting the fragments to object using unmarshalling in java using spring batch injection.
While compiling the itemreader displays records by skipping in-between records.
Please help.
data in xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root>
<trade>
<isin>XYZ0001</isin>
<quantity>5</quantity>
<price>11.39</price>
<customer>Customer1</customer>
</trade>
<trade>
<isin>XYZ0006</isin>
<quantity>7</quantity>
<price>11.50</price>
<customer>Customer1a</customer>
</trade>
<trade>
<isin>XYZ0002</isin>
<quantity>2</quantity>
<price>72.99</price>
<customer>Customer2c</customer>
</trade>
<trade>
<isin>XYZ0007</isin>
<quantity>8</quantity>
<price>11.666</price>
<customer>Customer3a</customer>
</trade>
<trade>
<isin>XYZ0003</isin>
<quantity>9</quantity>
<price>99.99</price>
<customer>Customer3</customer>
</trade>
</root>
output in console:
isin: XYZ0006 price 11.50 cust Customer1a
isin: XYZ0007 price 11.666 cust Customer3a
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules