求一句xpath
<?xml version= "1.0 " encoding= "utf-8 "?>
<ChannelList>
<body>
<channel title= "奔驰 " text= "奔驰 " />
<folder title= "汽车 ">
<channel title= "雪佛兰 " text= "雪佛兰 " />
</folder>
<folder title= "家电 ">
<channel title= "索尼 " text= "索尼 " />
<folder title= "日化 ">
</folder>
</folder>
</body>
</ChannelList>
求body节点下第三个元素名称为folder或channel的子节点的第一个子节点,即这个节点: <channel title= "索尼 " text= "索尼 " />
[解决办法]
/body/*[name()= 'folder ' or name()= 'channel '][3]/*[1]