<PRPA_IN201311UV02 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ITSVersion="XML_1.0" xsi:schemaLocation="urn:hl7-org:v3 ../multicacheschemas/PRPA_IN201311UV02.xsd" xmlns="urn:hl7-org:v3">
<id root="2.16.156.10011.0" extension="22a0f9e0-4454-11dc-a6be-3603d6866807"/>
<creationTime value="20070803130624"/>
<interactionId root="2.16.840.1.113883.1.6" extension="PRPA_IN201311UV02"/>
<processingCode code="P"/>
<processingModeCode code="R"/>
类似这样开头的,有命名空间的xml,使用xpath解析,解析不出来
可以通过关键字:“xpath 命名空间”去搜索引擎搜一下,有一些解决方案,但是都没实验成功
最后我只能把这些命名空间给去掉了。
xpath语法:http://www.w3school.com.cn/xpath/xpath_syntax.asp
具有点参考价值的:https://stackoverflow.com/questions/595946/parse-xml-with-namespace-using-simplexml