为什么即使不使用命名空间也能使用此xPath

时间:2013-11-15 15:19:49

标签: xml xpath

这是我的XML

<?xml version="1.0" encoding="UTF-8"?>
<TXLife xmlns="http://ACORD.org/Standards/Life/2" version="2.15.00">
    <TXLifeResponse>
        <TransRefGUID>1543f300-0142-1000-038d-0002b387f2ab</TransRefGUID>
        <TransType tc="1122">General Requirements Result Transmittal</TransType>
        <TransExeDate>2013-11-15-05:00</TransExeDate>
        <TransExeTime>09:57:32.662-05:00</TransExeTime>
        <TransResult>
            <ResultCode tc="1">Success</ResultCode>
        </TransResult>
    </TXLifeResponse>
</TXLife>

这里是XPath:     /的TXLife / TXLifeResponse / TransResult /的ResultCode / @ TC

想知道为什么即使未指定XPath,此1会返回值namespace

0 个答案:

没有答案