Hi all,
I need a search to be done on a xml file and print the found matches. Its a xml file with product and brands , by using php how can I do that.. Here is the format of xml..
- <categories>
- <category id="1" name="Flowline equipments">
- <products>
<product id="1">Hammer Unions</product>
<product id="2">Swivel Joints</product>
<product id="3">Pup Joints</product>
<product id="4">Chiksan Loops</product>
<product id="5">API Valves</product>
<product id="6">Manifolds</product>
<product id="7">Flanges & Fittings</product>
<product id="8">Ring Joint Gaskets</product>
<product id="9">Stud Bolts</product>
</products>
- <brands>
<brand id="1">FMC</brand>
<brand id="2">ANSON</brand>
<brand id="3">KEMPER</brand>
<brand id="4">SPM</brand>
<brand id="5">AMERICAN BLOCK</brand>
<brand id="6">SARA SAE</brand>
<brand id="7">PARVEEN OILFIELD</brand>
<brand id="8">WINDGLASS ENGINEERS</brand>
<brand id="9">SMITH</brand>
<brand id="10">LAMONS</brand>
<brand id="11">FLEXITALLIC</brand>
</brands>
</category>
</categories>
pls help
Xml parsing
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Xml parsing
http://us2.php.net/manual/en/refs.xml.php
There are many solutions in PHP. SimpleXML is the easiest way to read XML files.
There are many solutions in PHP. SimpleXML is the easiest way to read XML files.
(#10850)
Re: Xml parsing
what do you want to search for??
Re: Xml parsing
I need to serch for the products and brands. Actually site is a static one and need to have a secrh option