高分求一个简单XML的解析语法
<?xml version="1.0" encoding="GBK"?>
<tiripPackage version="1.0" xmlns="http://www.chinatax.gov.cn/tirip/dataspec">
<identity>
<serviceId>XAAB07</serviceId>
<channelId>0S00</channelId>
<globalBusinessId>3400090401000006782395S11AXAAB07</globalBusinessId>
</identity>
</tiripPackage>
请问如何取到serviceId的值呢?我是想用这样的方法:
doc.selectSingleNode("//tiripPackage/identity/serviceId").getText();
可是不行。。。