Menu

Figures 124 125 Beginning End Respectively Xml Document Contains Data Running Products Exe Q43793215

Figures 12.4 and 12.5 are the beginning and end,respectively,

of an XML document that contains some of the data from ourrunning

products exercise. Write the following XPath queries. W hat isthe result of each?

<Products> <Maker name = A> <PC model = 1001 price = 2114> <Speed>2.66</Speed> <RAM>1024</RAM> <HardDisk>250</HardDisk>

<Maker name = E> <PC model = 1011 price = 959> <Speed>1.86</Speed> <RAM>2048</RAM> <HardDisk>160</HardDisk> </PC> <PC m

a) Find the amount of RAM on each PC.

b) Find the price of each product of any kind.

c) Find all the printer elements.

d) Find the model numbers of PC ’s with a hard disk of at least200 gigabytes

<Products> <Maker name = “A”> <PC model = “1001” price = “2114”> <Speed>2.66</Speed> <RAM>1024</RAM> <HardDisk>250</HardDisk> </PC> <PC model = “1002” price = “995”> <Speed>2.10</Speed> <RAM>512</RAM> <HardDisk>250</HardDisk> </PC> <Laptop model = “2004” price = “1150”> <Speed>2.00</Speed> <RAM>512</RAM> <HardDisk>60</HardDisk> <Screen>13.3</Screen> </Laptop> <Laptop model = “2005” price = “2500”> <Speed>2.16</Speed> <RAM>1024</RAM> <HardDisk>120</HardDisk> <Screen>17.0</Screen> </Laptop> </Maker> Figure 12.4: XML document with product data — beginning <Maker name = “E”> <PC model = “1011” price = “959”> <Speed>1.86</Speed> <RAM>2048</RAM> <HardDisk>160</HardDisk> </PC> <PC model = “1012” price = “649”> <Speed>2.80</Speed> <RAM>1024</RAM> <HardDisk>160</HardDisk> </PC> <Laptop model = “2001” price = “3673”> <Speed>2.00</Speed> <RAM>2048</RAM> <HardDisk>240</HardDisk> <Screen>20.1</Screen> </Laptop> <Printer model = “3002” price = “239”> <Color>false</Color> <Type>laser</Type> </Printer> <Maker name = “H”> <Printer model = “3006” price = “100”> <Color>true</Color> <Type>ink-jet</Type> </Printer> <Printer model = “3007” price = “200”> <Color>true</Color> <Type>laser</Type> </Printer> </Maker> </Products> Figure 12.5: XML document with product data – end Show transcribed image text 2.66 1024 250 2.10 512 250 2.00 512 60 13.3 2.16 1024 120 17.0 Figure 12.4: XML document with product data — beginning
1.86 2048 160 2.80 1024 160 2.00 2048 240 20.1 false laser true ink-jet true laser Figure 12.5: XML document with product data – end

Expert Answer


Answer to Figures 12.4 and 12.5 are the beginning and end, respectively, of an XML document that contains some of the data from ou…

OR