使用下面的示例,我应该如何解析“HotelRef”的“HotelCode”属性?
<OTA_HotelAvailRQ Version="1.0" TimeStamp="2005-08-01T09:30:47+02:00" EchoToken="fb57388d" AvailRatesOnly="true" xmlns="http://www.opentravel.org/OTA/2003/05">
<AvailRequestSegments>
<AvailRequestSegment AvailReqType="Room">
<HotelSearchCriteria>
<Criterion>
<HotelRef HotelCode="HOTEL1"/>
</Criterion>
</HotelSearchCriteria>
</AvailRequestSegment>
</AvailRequestSegments>
</OTA_HotelAvailRQ>
我能够从 SOAP 服务器获得响应,请参阅下面的输出,但请注意 HotelRef 为空。如何访问属性?
stdClass Object
(
[AvailRequestSegments] => stdClass Object
(
[AvailRequestSegment] => stdClass Object
(
[HotelSearchCriteria] => stdClass Object
(
[Criterion] => stdClass Object
(
[HotelRef] =>
)