Re: URGENT! please help me at parsing multiple data looply
Brought to you by:
bs_php,
nigelswinson
From: Nigel S. <nig...@us...> - 2004-08-09 22:11:43
|
You need to these functions: a.. http://www.carrubbers.org/scripts/php/xpath/doc/#importFromFile = (or perhaps = http://www.carrubbers.org/scripts/php/xpath/doc/#importFromString) b.. http://www.carrubbers.org/scripts/php/xpath/doc/#match with some = XPath along the lines of \\user[location =3D USA] c.. http://www.carrubbers.org/scripts/php/xpath/doc/#getAttributes But to be honest, you might be better off using XSLT. There you can do = an xsl:sort. But it sounds like you might be trying to use XML as a database format, = in which case you possibly want to have a look at the phpxmldb project: = http://www.carrubbers.org/scripts/php/xmldb/ where you have an API = called Search() and SortSearch(). Nigel=20 ----- Original Message -----=20 From: BeDii KaYa=20 To: php...@li...=20 Sent: Saturday, August 07, 2004 1:23 PM Subject: URGENT! please help me at parsing multiple data looply I have an XML like <main> <result> [true / false] </result> <userlist> <user id=3D"xxxxxxx"> <regdate>19/2/2004</date> <reg_time>11:39:50</start_time> <location>United Kingdom</location> </user>=20 <user id=3D"xxxxxxx"> <regdate>19/3/2004</date> <reg_time>01:39:50</start_time> <location>USA</location> </user>=20 .. .. .. . =20 . </userlist> </main> How can i parse this XML document in PHP by categorized as Country? = In other words i need parse it looply.. PLEASE HELP ME! I WILL BE GLAD! -------------------------------------------------------------------------= ----- Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! |