a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 128|回复: 0

[考试试题] 微软MCSD.NET70310考题(110)

[复制链接]
发表于 2012-8-3 00:09:22 | 显示全部楼层 |阅读模式
  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
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-7 04:10 , Processed in 0.343029 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表