Código PHP:
<HotelValuedAvailRS xmlns="http://www.hotelbeds.com/schemas/2005/06/messages" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:schemaLocation="http://www.MIWEB.com/schemas/2005/06/messages HotelValuedAvailRS.xsd" timeToExpiration="1799559" totalItems="326" echoToken="DummyEchoToken">
- <AuditData>
<ProcessTime>1016</ProcessTime>
<Timestamp>2007-01-09 16:08:56.263</Timestamp>
<RequestHost>10.0.0.182</RequestHost>
<ServerName>ITINTERNET08</ServerName>
<ServerId>LO</ServerId>
<SchemaRelease>2005/06</SchemaRelease>
<HydraCoreRelease>2.0.200701021600</HydraCoreRelease>
<HydraEnumerationsRelease>1.0.200701021600</HydraEnumerationsRelease>
<MerlinRelease>N/A</MerlinRelease>
</AuditData>
<PaginationData currentPage="1" totalPages="17" />
- <ServiceHotel xsi:type="ServiceHotel" availToken="gSPgFZmXOz/wKAXjNFfUdQ==">
- <ContractList>
- <Contract>
<Name>CGMVARIOS</Name>
<IncomingOffice code="1" />
<Classification code="NOR">STANDARD PRICING</Classification>
</Contract>
</ContractList>
<DateFrom date="20071022" />
<DateTo date="20071024" />
<Currency code="EUR">Euro</Currency>
- <HotelInfo xsi:type="ProductHotel">
<Code>76</Code>
<Name>Bendinat</Name>
- <ImageList>
- <Image>
<Type>JPG</Type>
<Order>1</Order>
<VisualizationOrder>1</VisualizationOrder>
<Url>http://www.MIWEB.com/giata/small/old/MALLORCA/BENDINAT/BENDINATHOT.JPG</Url>
</Image>
- <Image>
<Type>jpg</Type>
<Order>2</Order>
<VisualizationOrder>2</VisualizationOrder>
<Url>http://www.MIWEB.com/giata/small/036157/036157_hb_r_002.jpg</Url>
</Image>
</ImageList>
<Category type="SIMPLE" code="4EST" shortname="4*">4 STARS</Category>
- <Destination type="SIMPLE" code="PMI">
<Name>Majorca</Name>
- <ZoneList>
<Zone type="SIMPLE" code="25">Bendinat</Zone>
</ZoneList>
</Destination>
<Position latitude="39.53240000000000264890" longitude="2.58029999999999981597" />
</HotelInfo>
- <AvailableRoom>
- <HotelOccupancy>
<RoomCount>1</RoomCount>
- <Occupancy>
<AdultCount>2</AdultCount>
<ChildCount>0</ChildCount>
</Occupancy>
</HotelOccupancy>
- <HotelRoom SHRUI="x/Sef0dn9jkzCPIf9cUSFg==" onRequest="N">
<Board type="SIMPLE" code="HDE10" shortname="BB">BED AND BREAKFAST</Board>
<RoomType type="SIMPLE" code="DBLE10" characteristic="ST">DOUBLE/ TWIN STANDARD</RoomType>
- <Price>
<Amount>324.420</Amount>
</Price>
</HotelRoom>
</AvailableRoom>
<+/HotelValuedAvailRS
en otras palabras quiero sacar el valor de availToken="gSPgFZmXOz/wKAXjNFfUdQ=="
genero los arrays con este codigo pero no me funciona jala los nodes pero no los conetnidos de los nodes
este el code aver si alguien me echa una mano.
Código PHP:
$_token = array();
$request_xml = 'mixmlrequest';
$token_xml = getXMLResponse(XML_POST_URL_MIWEB,$request_xml);
/*if(strpos('xml',$paises_xml)===true)
{*/
$_token = $this->parseXmlToArray($token_xml);
$_token = $_token['HotelValuedAvailRS'];
if(count($_token)>0)
{
foreach($_token as $_tok)
{
$temp['HotelValuedAvailRS']=$_tok['HotelValuedAvailRS'];
$_token[]=$temp;
}
}
/*}*/
return $_token;