Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Example 10-1 shows an XML file that contains details of a company's current inventory of widgets. We have each widget's part number, name, price, and current stock. This data might be generated by a stock control system.
|
Code View:
Scroll
/
Show All <inventory>
<product id="0050">
<name>Basic Widget</name>
<price>49.99</price>
<stock>2500</stock>
</product>
<product id="0051">
<name>Cheap Widget</name>
<price>29.99</price>
<stock>5000</stock>
</product>
<product id="0101">
<name>Super Widget</name>
<price>99.99</price>
<stock>1000</stock>
</product>
<product id="0102">
<name>Ultra Widget</name>
<price>149.99</price>
<stock>500</stock>
</product>
</inventory>
|