はTFLステータスフィードからいくつかのデータをプルしようとする機能 -XPathはない
<LineStatus ID="6" StatusDetails="Minor delays between Acton Town and Heathrow/Uxbridge due to an earlier faulty train at Holborn. GOOD SERVICE on the rest of the line.">
<BranchDisruptions>
<BranchDisruption>
<StationTo ID="244" Name="Uxbridge"/>
<StationFrom ID="1" Name="Acton Town"/>
<Status ID="MD" CssClass="GoodService" Description="Minor Delays" IsActive="true">
<StatusType ID="1" Description="Line"/>
</Status>
</BranchDisruption>
<BranchDisruption>
<StationTo ID="284" Name="Heathrow Terminal 5"/>
<StationFrom ID="1" Name="Acton Town"/>
<Status ID="MD" CssClass="GoodService" Description="Minor Delays" IsActive="true">
<StatusType ID="1" Description="Line"/>
</Status>
</BranchDisruption>
</BranchDisruptions>
だけのxpath = // @名を使用して、当社の看板ソフトウェアの名称要素からデータを引き出すために動作しますが、私はしないでくださいノードが<BranchDisruption>
親の下にある場合は、ノードを表示します。
しかし、運がないと多くの組み合わせを試しました。誰にも何か提案はありますか?
親の下に「Name」という名前の要素はありません – splash58
例から選択したい要素を正確に記述してください。 – splash58
こんにちはsplash58、すみません、私は情報を残しました。あなたがName = "Uxbridge"を持っていれば、これは私のために働いています(コードは 'Uxbridge'を引き出しますが、タグの下にあればうまくいきません。 –