读取 xml 流
抱歉再次问这样类似的问题,我正在尝试阅读以下 XML 文档:
<markets currency="GBP">
<market id="2908368" nextId="2908395">
<status>ACTIVE</status>
<commissionRate>2.5</commissionRate>
<marketType>ANY_NUMBER_OF_WINNERS</marketType>
<selections type="MainBets">
<selection id="658442">
<name>Player 1</name>
<resource href="https://api.betfair.com/rest/v1/selection/tradeActivity
?username=sampleuser&marketId=2908368&selectionId=658442"
responseType="selectionTradeActivity" title="Trade Activity"/>
<status>IN_PLAY</status> <!-- THIS IS THE VALUE I WANT -->
<amountMatched>0.0</amountMatched>
<bestAvailableToBackPrices/>
<bestAvailableToLayPrices/>
</selection>
</selections>
</market>
</markets>
有 4 个玩家,每个玩家都有我想要的值,但我只能获得相同的状态,而不是每个玩家的个人状态。 请有人帮助我。 非常感谢
Sorry to be asking such similar question again, I am trying to read the following XML document:
<markets currency="GBP">
<market id="2908368" nextId="2908395">
<status>ACTIVE</status>
<commissionRate>2.5</commissionRate>
<marketType>ANY_NUMBER_OF_WINNERS</marketType>
<selections type="MainBets">
<selection id="658442">
<name>Player 1</name>
<resource href="https://api.betfair.com/rest/v1/selection/tradeActivity
?username=sampleuser&marketId=2908368&selectionId=658442"
responseType="selectionTradeActivity" title="Trade Activity"/>
<status>IN_PLAY</status> <!-- THIS IS THE VALUE I WANT -->
<amountMatched>0.0</amountMatched>
<bestAvailableToBackPrices/>
<bestAvailableToLayPrices/>
</selection>
</selections>
</market>
</markets>
There are 4 players each with a value that I want, but I can only get the same status, not each players individual status. Please can someone help me. Many many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以使用 xpath 这是一个例子
you can use xpath here is an example