I have an xml file which is 7mb in size and i would like to extract the info and add it to mysql and create new tables with the extracted info.
Below is the structure of the xml file (the original file has over 1185 properties), this example only has one.
I would like to know how i could remove elements that are not required from the feed with coldfusion and then import the required fields into tables in mysql
<?xml version="1.0" encoding="UTF-8"?>
<root>
<properties>
<property>
<details>
<propertyid>112</propertyid>
<name>Spain, Costa del Sol, Marbella, Capanes del Golf Apartment- 5* hotel facilities</name>
<reference>2360</reference>
<price>376242</price>
<pricetype id="4">N/A</pricetype>
<status id="3">For Sale</status>
<description>
<p>Capanes del Golf is one of the most exclusive project in Costa del Sol at this time. The complex with luxurious apartments is located near the road to Benahavis and just a few minutes away from the coast.</p>
<p>Positioned at the very heart of the New Marbella Club Golf Course (El Higueral Golf), its location is unique as it is totally surrounded by the course. As well as its stunning location at the heart of the course, the complex also enjoys more than 50.000 m2 of carefully landscaped Mediterranean gardens with water areas, swimmingpools as well as a private Club Social with Spa and fitness.</p>
<p>All of the apartments at Capanes del Golf have a golf share to the New Marbella Club Golf Course included in the sales price, this allows the client full access to the golf course surrounding the project. Capanes del Golf is a project not just to be lived but also enjoyed as a home.</p>
<p>
<strong>Additional Features</strong>
</p>
<p>5 * Hotel facilties<br />Gym<br />Health spa available on site<br />Established on a Golf resort</p>
</description>
<levels>0</levels>
<bedrooms>2</bedrooms>
<bathrooms>1</bathrooms>
<areacovered>189</areacovered>
<areaplot>0</areaplot>
<areaveranda>0</areaveranda>
<areagarden>0</areagarden>
<promote>0</promote>
<sleeps>0</sleeps>
<deliverydate />
<googlemapurl />
<latitude />
<longitude />
<mapzoom />
<mapactive>0</mapactive>
<investment />
<ownernotes />
<dateadded />
<dateupdated>01/01/2013</dateupdated>
<sortweight>0</sortweight>
<urlalias>spain-costa-del-sol-marbella-hotel-facilities-1</urlalias>
<url>http://ift.tt/1r5x6iF;
</details>
<location>
<country id="27" urlalias="spain">Spain</country>
<district id="52" urlalias="costa-del-sol">Costa del Sol</district>
<location id="929" urlalias="marbella">Marbella</location>
</location>
<types>
<type id="8" urlalias="apartment-flat">Apartment-Flat</type>
</types>
<categories />
<features />
<images>
<imageurl>http://ift.tt/13jXlH1;
<imageurl>http://ift.tt/1r5x6z1;
<imageurl>http://ift.tt/1r5x6z3;
<imageurl>http://ift.tt/1r5x8ab;
<imageurl>http://ift.tt/13jXiLm;
<imageurl>http://ift.tt/1r5x6z7;
</images>
</property>
</properties>
</root>
Any help would be greatly appreciated.
No comments:
Post a Comment