Searching XML file
Posted: Wed Dec 27, 2006 6:42 am
feyd | Please use
Would it be possible to return all the node information for a given search, so for example:[/syntax]
which would return
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi
I have a XML file which is way too big to parser ( 417MB ) so i`m wanting to create a class so i can return the values of a given search.
so say the XML was:
[syntax="xml"]
<houses>
<house>
<code>PT1234</code>
<rooms>3</rooms>
<price>100000</price>
</house>
<house>
<code>ABCD12</code>
<rooms>7</rooms>
<price>200000</price>
</house>
<house>
<code>XYZ12</code>
<rooms>1</rooms>
<price>50000</price>
</house>
<house>
<code>PYT122</code>
<rooms>6</rooms>
<price>56000</price>
</house>
</houses>
Code: Select all
getinfo(ABCD12);Code: Select all
$code = "ABCD12";
$rooms=7;
$price= 200000;feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]