Announcement Announcement Module
Collapse
No announcement yet.
Reading from XMl using Itemreader Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
Working...
X