微软MCAD 70-310 实战百题
题目内容

Your company buys and sells used refrigerators. External vendors frequently send you XML documents that list one type of used appliances for sale. The documents that you receive contain either only washers or only refrigerators as in the following example.<!——A document with refrigerators --><saleList><refrigerators>〈refrigerator type="freezer on bottom", price="210"/> </refrigerators〉</saleList><!-- A document with washers --><saleList><washers><washer type="front load" , price="145"/> <washer type="top load" , price="130"/> </washers></saleList>All incoming XML documents are loaded into a MemorySystem object named used List.You need to automate a process that will discover XML documents contain refrigerator elements. As soon as you ascertain that a document contains refrigerators, you can stop processing the document.You decide to use Visual studio .NET to develop an application that will contain a Boolean variable named hasRefrigerator. A value of True for this variable means that a document contains refrigerator elements. A value of false means that it does not. You want to ensure that the discovery process occurs as quickly as possible.What should you do?

2021-12-25

A.Create an XtalDocument object and load it from used List. Use the SelectSingleNode method to search the XmlDocument object for the saleLisUrefrigerators node. If this node is found, aet hasRefrigerator to True. Otherwise, set hasRefrigerator to False

B.Create an XmlXPathDocument object and load it from usedList. Use an XPatbNavigator object to search the XmlXPathDocument for the saleLisUrefrigerators node. If this node is found, set hasRefrigerator to True. Otherwise, set hasRefrigerator to False

C.Create an XmlTextReader object on used List. Loop through usedlist by using the MoveToContent method of the XmlTextReader object and comparing for the sale list/refrigerators node. If this node is found, set hasRefrigerator to True. Otherwise, set hasRefrigerator to False

D.Create a DataSet object and use its ReadXml method to load used list into the object. If the Count property of the Rows collection of the "refrigerators'* entry in the object is not equal to zero, set hasRefrigerator to Tru

E.Otherwise, set hasRefrigerator to False

题目答案

试卷相关题目

最新试卷
热门试卷

长理培训客户端 资讯,试题,视频一手掌握

去 App Store 免费下载 iOS 客户端