<?xml version="1.0"?>
<autos>
<manufacturer name="Chevrolet">
<make name="Corvette">
<model>test</model>
<price currency="usd">60,000</price>
<horsePower>420</horsePower>
<fuelCapacity units="test">18.5</fuelCapacity>
</make>
</manufacturer>
<manufacturer name="test">
<make name="test">
<model>test</model>
<price currency="usd">30,000</price>
<horsePower>350</horsePower>
<fuelCapacity units="gallons">15.5</fuelCapacity>
</make>
</manufacturer>
</autos>对于这个xml文档,如何查找所有值为test的属性节点和文本节点?
我这样写了 nodelist =m_pDocRoot->selectNodes("/autos/*[contains(.,'test')]");但不行,那位大哥帮我看看,谢谢
<autos>
<manufacturer name="Chevrolet">
<make name="Corvette">
<model>test</model>
<price currency="usd">60,000</price>
<horsePower>420</horsePower>
<fuelCapacity units="test">18.5</fuelCapacity>
</make>
</manufacturer>
<manufacturer name="test">
<make name="test">
<model>test</model>
<price currency="usd">30,000</price>
<horsePower>350</horsePower>
<fuelCapacity units="gallons">15.5</fuelCapacity>
</make>
</manufacturer>
</autos>对于这个xml文档,如何查找所有值为test的属性节点和文本节点?
我这样写了 nodelist =m_pDocRoot->selectNodes("/autos/*[contains(.,'test')]");但不行,那位大哥帮我看看,谢谢
解决方案 »
- vc 如何向access中insert一条记录
- 该继续读书, 还是去找工作, 望老鸟指点迷津
- 收藏 不显示删除回复显示所有回复显示星级回复显示得分回复 C++调用SAP的RFC,RfcCallReceive收不到返回的参数,为什么
- 弹出菜单没有写相应的处理函数为什么不灰色?
- 为什么我的activex控件在debug下可以注册在release下不能注册
- 还是关于UDP穿透防火墙的问题
- 切分MDI出现的简单问题 在线ing
- 外包开发照相贴纸软件,有兴趣的请进
- 编译一个CPP文件时,出现这个错误怎么办?
- 急问:VC中的makefile工程如何产生调试信息?送分啊!
- 如何让鼠标滚轮 滚动非最前窗口?
- 求助:动态库的问题!
值为test文本节点?
<model>test </model>
<manufacturer name="test">..
<make name="test">
<model>test </model>
我的意思是 根据test找到nodename是model manufacturer make model的元素节点 谢谢
//child::text()[contains(.,'test')]|//self::test|//attribute::test|//@*[contains(.,'test')]