xpath通配符有效,但无法获取任何其他查询以返回节点

时间:2019-02-28 20:24:17

标签: xpath

我有以下xml(只有一个段,还有更多的IntervalBlock条目。当我使用// *时,我按预期方式获得了所有元素,但是当我尝试// feed / entry时却一无所获并希望看到所有内容入口元素。我尝试过/ feed // entry [id =一个ID号],但一无所获。帮助

`<feed xmlns="http://www.w3.org/2005/Atom" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://naesb.org/espi espiDerived.xsd">
<id>82E32231BF8900BEE0530A974F8CA81F</id>
<title>SMT Green Button Report: Interval</title><updated>2019-02- 
26T15:49:00Z</updated>
<link rel="self" href="/ThirdParty/83e269c1/Batch"/>
<entry>...</entry>
<entry>...</entry>
<entry>...</entry>
<entry>
<id>82E32360DF5302AAE0530A974F8A5761</id>
<link rel="self" href="RetailCustomer/9b6c7063/UsagePoint/01/MeterReading/01/IntervalBlock/0173"/>
<link rel="up" href="RetailCustomer/9b6c7063/UsagePoint/01/MeterReading/01/IntervalBlock"/>
<title>Central Time</title>
<content>
<IntervalBlock xmlns="http://naesb.org/espi">
<interval>
<duration>86400</duration>
<start>1551139200</start>
</interval>
<IntervalReading>
<timePeriod>
<duration>900</duration>
<start>1551140100</start>
</timePeriod>
<value>978</value>
</IntervalReading>
</IntervalBlock>
<IntervalBlock xmlns="http://naesb.org/espi">
<interval>
<duration>86400</duration>
<start>1551140100</start>
</interval>
<IntervalReading>
<timePeriod>
<duration>900</duration>
<start>1551141000</start>
</timePeriod>
<value>973</value>
</IntervalReading>
</IntervalBlock>
</entry>
</feed>

`

0 个答案:

没有答案