Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2004
    Posts
    60

    Unanswered: XML DB - Insert / Update / Delete Items

    Hi

    I require some guidence on how to Insert / Delete / Update data from XML DB Schema.

    I have created XML table based on a sample PurchaseOrder.XSD and inserted couple of xmls into it.

    Now, I want to Added New Items / Delete Items & Update the Items data.

    I am able to update using the following query, I want to insert a new item, delete an existing item.

    Code:
    UPDATE xml_PurchaseOrder t
      SET value(t) = 
      updateXML(value(t),
                '/PurchaseOrder/LineItems/LineItem[2]',
                xmltype('<LineItem ItemNumber="4">
                           <Description>Andrei Rublev</Description>
                           <Part Id="715515009928" UnitPrice="39.95"
                                 Quantity="2"/>
                         </LineItem>'
                 )
      )
      WHERE existsNode(value(t),
            '/PurchaseOrder[Reference="999"]'
      ) = 1;
    Cheers
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •