You are developing an ASP.NET web page. The page must display data from XML file named
Inventory.xml. Inventory.xml contains data in the following format.
<?xml version=”1.0″ standalone=”yes”?>
<inventory>
<vehicle Make=”BMW” Model=”M3″ Year=”2005″ Price=”30000″ instock=”Yes”>
<Ratings>….</Ratings>
</Vechicle>
….
</Inventory>
You need to display Vehicle elements that have the inStock attribute set to YES. Wich two controls
should you add to the page? (Each control presents part of the solution.Choose two.)
A.
<asp:GridView ID=”GridView1″ runat=”server”
AutoGenerateColumns=”True”
DataSource=”inventoryXMLDataSource”>
….
</asp:GridView>
B.
<asp:GridView ID=”GridView1″ runat=”server”
AutoGenerateColumns=”True”
DataSourceID=”inventoryXMLDataSource”>
….
</asp:GridView>
C.
<asp:XMLDataSource ID=”InventoryXMLDataSource”
runat=”server” DataFile=”Inventory.xml”
XPath=”/Inventory/Car[@InStock=’Yes’]”>
</asp:XMLDataSource>
D.
<asp:XMLDataSource ID=”InventoryXMLDataSource”
runat=”server” DataFile=”Inventory.xml”
XPath=”/Inventory/Car/InStock=’Yes'”>
<Data>Inventory.xml</Data>
</asp:XMLDataSource>
I think the correct answer is B-C