特别着急,请大家帮忙!!!!

datoubao 2006-03-22 05:19:42
<SlipPrintPositionMaster>
<AlterationFlag>0</AlterationFlag>
<BlockID>1</BlockID>
<TableNameRangeStart>0</TableNameRangeStart>
<TableNameRangeEnd>0</TableNameRangeEnd>
<ServiceChargeFlag>0</ServiceChargeFlag>
<TableChargeFlag>0</TableChargeFlag>
<FloorBillPrinterID>0</FloorBillPrinterID>
<CookSlipPrint Subscript="1">
<Quantity>0</Quantity>
</CookSlipPrint>
<TicketSlipPrint Subscript="1">
<Quantity>0</Quantity>
</TicketSlipPrint>
<FloorBillSubPrinterID1>1</FloorBillSubPrinterID1>
<FloorBillSubPrinterID2>1</FloorBillSubPrinterID2>
</SlipPrintPositionMaster>
以上这段xml,如何读取“CookSlipPrint ”项目的下标 Subscript="1",谢谢大家!!1
...全文
69 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
slimpotato 2006-03-23
  • 打赏
  • 举报
回复
XML 路径语言(XPath) (版本 1.0)
http://www.opendl.com/openxml/w3/TR/xpath/xpath-gb.html
slimpotato 2006-03-23
  • 打赏
  • 举报
回复
set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")
xmlDoc.load(Server.MapPath("/xmlname.xml"))
set root = xmlDoc.selectSingleNode("//CookSlipPrint")
root.attributes.getNamedItem("Subscript").Value '你要的值
datoubao 2006-03-23
  • 打赏
  • 举报
回复
能具体讲一下怎么用XPATH么?我读取xml文件用的是XmlTextReader,没有XPATH
soft_2008 2006-03-22
  • 打赏
  • 举报
回复
- -
是是非非 2006-03-22
  • 打赏
  • 举报
回复
用XPATH :/SlipPrintPositionMaster/CookSlipPrint/@Subscript
sky0120 2006-03-22
  • 打赏
  • 举报
回复
帮你顶
mingxuan3000 2006-03-22
  • 打赏
  • 举报
回复
mark

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧