Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
|
B2B: How iProcurement Uses XML to Offer Multiple Catalog Products to Users, 7 of 16
Table 10-3 lists the DTD's ITEM information fields.
Table 10-3 DTD ITEM> InformationData items can be added to a category, deleted, and modified. All data items must be placed between the <DATA></DATA> tag. The identity feature (specifying a <NAME> and/or <KEY>) allows the wholesale change of values by effectively wildcarding updates. The update example below provides a method to change all items with a manufacturer Bic to Bic, Inc.
This is an example of adding items to the iProcurement DTD using <ITEM ACTION="ADD"> marker.
<DATA> <ITEM ACTION="ADD"> <OWNER> <NAME>Pens</NAME> </OWNER> <NAMEVALUE> <NAME>Mfg Name</NAME> <VALUE>Bic</VALUE> </NAMEVALUE> <NAMEVALUE> <NAME>Barrel Color</NAME> <VALUE>Blue</VALUE> </NAMEVALUE> </ITEM> <ITEM ACTION="ADD"> <OWNER> <NAME>Pencils</NAME> </OWNER> <NAMEVALUE> <NAME>Mfg Name</NAME> <VALUE>Bic</VALUE> </NAMEVALUE> </ITEM> </DATA>
This is an example of deleting items from the iProcurement DTD using <ITEM ACTION="DELETE"> marker.
<DATA> <ITEM ACTION="DELETE"> <OWNER> <NAME>Pens</NAME> </OWNER> <NAMEVALUE> <NAME>Mfg Name</NAME> <VALUE>Bic</VALUE> </NAMEVALUE> <!- -removes all items by Bic mfg from Pens - -> <NAMEVALUE> <NAME>Barrel Color</NAME> <VALUE>Blue</VALUE> </NAMEVALUE> </ITEM> </DATA>
This is an example of updating items from the iProcurement DTD using <ITEM ACTION="UPDATE"> marker.
When updating and item, the owner tag is optional. This allows for updates of multiple items with a specific value.
<DATA> <-- Updating Item by Item --> <ITEM ACTION="UPDATE"> <OWNER> <NAME>Pens</NAME> </OWNER> <NAMEVALUE> <NAME>Mfg Name</NAME> <VALUE>Bic </VALUE> </NAMEVALUE> <NAMEVALUE> <NAME>Barrel Color</NAME> <VALUE>Blue</VALUE> </NAMEVALUE> <UPDATE> <NAMEVALUE> <NAME>Mfg Name</NAME> <VALUE>Bic Inc.</VALUE> </NAMEVALUE> <NAMEVALUE> <NAME>Barrel Color</NAME> <VALUE>Red</VALUE> </NAMEVALUE> </UPDATE> </ITEM> <-- This section below updates items with Mfg Name= Bic --> <ITEM ACTION="UPDATE"> <NAMEVALUE> <NAME>Mfg Name</NAME> <VALUE>Bic </VALUE> </NAMEVALUE> </ITEM> </DATA>
|
Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|