会计考友 发表于 2012-8-3 00:09:22

微软MCSD.NET70310考题(110)

  1.You are creating an XML Web service named CustomerService. This service receives an XML file of customer information in the following format:CustomerDataCustomersCustomerID1234/CustomerIDCompanyNameAdventure Works/CompanyName/CustomersCustomersCustomerID2345/CustomerIDCompanyNameCoho Winery/CompanyName/Customers/CustomerDataYou want to parse the XML file to build a flat file that will be used by another application. The flat file should be in the following format:CustomerID=1234CompanyName=Adventure WorksCustomerID=2345 CompanyName=Coho WineryYou write the following code:Dim myXMLDoc As New XmlDocument()myXMLDoc.Load(C:TableSchemaXML.xml)Dim myRootNode As XmlNode = myXMLDoc.FirstChildDim customerOutput As StringDim curNode As XmlNode Dim i As IntegerYou need to write the code that will parse the document and build the customerOutput string that will be used to write each row in the file.Which code segment should you use?A: Dim myNodeList As XmlNodeList = _myRootNode.SelectNodes(/CustomerData/Customers)For Each curNode In myNodeListIf curNode.HasChildNodes Then
页: [1]
查看完整版本: 微软MCSD.NET70310考题(110)