Hi,
I am working with a XML database which looks like:
- <Property>
<ID>14209</ID>
<Partner_Id>15</Partner_Id>
- <Name>
- <![CDATA[
]]>
</Name>
- <Reference>
- <![CDATA[ NOBR15
]]>
</Reference>
<Country>Portugal</Country>
- <Region>
- <![CDATA[ Madeira
]]>
</Region>
- <Location1>
- <![CDATA[ Funchal
]]>
</Location1>
- <Location2>
- <![CDATA[
]]>
</Location2>
<Type>Villa</Type>
<New_Development>0</New_Development>
<Leaseback>0</Leaseback>
<Investment>N</Investment>
<Price>404750.00</Price>
<Currency>GBP</Currency>
<Bedrooms>5</Bedrooms>
<Delivery_Date />
- <Short_Description>
- <![CDATA[
]]>
</Short_Description>
- <Long_Description>
- <![CDATA[ A TRUE RURAL RETREAT IN A TRANQUIL SETTING AMONGST LUSH VEGETATION ! Split level Quinta /Vila - on the Funchal Border - only 12km away from Funchal and 600m above sea level with breathtaking sea and mountainviews ! Only 4 years old ! Large 7070 m2 grounds Building rights for at least another dwelling to be built on the land - eg. granny cottage or another residential home. Type: Residential Style: 2 Story Split "Modern Upmarket Vila Design" Bedrooms: 4 "WITH BUILT IN CUPBOARDS" Bathrooms: 3 "MAIN EN-SUITE" Garage: Triple "LOADS OF EXTRA PARKING" Basement: No Size: 495 m² Lot Type: Rectangular Lot Size: 7070 m² n/a "WITH PERMISSION FOR BUILDING ANOTHER HOME ON STAND" Has Suite: Yes Year Built: 2000 "AS NEW" Taxes: €0.00 EUR Condo Fees: €0.00 EUR
]]>
</Long_Description>
- <Small_Image_URL>
- <![CDATA[ http://www.nobregarealty.com/Shared/Cache/Listing/114108/Photo/7-Gallery.img?_Version=632208272672200000
]]>
</Small_Image_URL>
- <Large_Image_URL>
- <![CDATA[ http://www.nobregarealty.com/Shared/Cache/Listing/114108/Photo/7-Gallery.img?_Version=632208272672200000
]]>
</Large_Image_URL>
<Extra_Images />
- <Currencies>
- <Currency>
<Name>EUR</Name>
<Price>599097.10</Price>
</Currency>
- <Currency>
<Name>GBP</Name>
<Price>404750.00</Price>
</Currency>
- <Currency>
<Name>USD</Name>
<Price>754848.94</Price>
</Currency>
</Currencies>
</Property>
Now this is the first time i have worked with an XML database so i have been looking around and found Simple XML but i don't have php5 only 4.
However i have found a class here: http://www.shop24-7.info/32-0-simplexml-alternative-php4.html
But what i need to know is how to work with this bit here:
$xml_parser = new sxml;
$src=implode ('', file ($url));
$xml_parser->parse($src);
$xml=$xml_parser->data;
print_r($xml);
I need to know how to add a condition to this e.g. print $XML where $_POST[country] = country
Cheers,
Adam