posted 20 years ago
Let's say for example, i want to store the following xml file as a CLOB object in the database, but i don't want to store the following lines in that CLOB object. Is there a way to eliminate <purchaseOrders> node. I am using JAXB. Can anyone help me on this? The reason i don't want to store this <purchaseOrders> node is, i want to create another xml document, add to it multiple purchaseOrder, with only one <purchaseOrders> node.
<?xml version="1.0" ?>
- <purchaseOrders>
</purchaseOrders>
---------------- File starts here ---------
<?xml version="1.0" ?>
- <purchaseOrders>
- <purchaseOrder orderDate="1999-10-20">
- <shipTo country="US">
<name>Alice Smith</name>
<street>123 Maple Street</street>
<city>Cambridge</city>
<state>MA</state>
<zip>12345</zip>
</shipTo>
- <billTo country="US">
<name>Robert Smith</name>
<street>8 Oak Avenue</street>
<city>Cambridge</city>
<state>MA</state>
<zip>12345</zip>
</billTo>
- <items>
- <item partNum="242-NO">
<productName>Nosferatu - Special Edition (1929)</productName>
<quantity>5</quantity>
<USPrice>19.99</USPrice>
</item>
- <item partNum="242-MU">
<productName>The Mummy (1959)</productName>
<quantity>3</quantity>
<USPrice>19.98</USPrice>
</item>
- <item partNum="242-GZ">
<productName>Godzilla and Mothra: Battle for Earth/Godzilla vs. King Ghidora</productName>
<quantity>3</quantity>
<USPrice>27.95</USPrice>
</item>
</items>
</purchaseOrder>
</purchaseOrders>
Thanks.
Appreciate your help !