Re: Parsing XML Code
| From: | Jason Barnett | Date: | Fri, 08 Apr 2005 19:20:02 +0000 |
| Subject: | Re: Parsing XML Code | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-25821@lists.php.net to get a copy of this message | ||
Jeb Barger wrote:
>
>
> I am have a hard time parsing a xml file from IIS box. What is the
> easiest way to parse a xml gotten from a url and parse the information
> into variables? Make Sense?
>
> Jeb
<?php
echo "<pre>\n";
$xml = urldecode($_GET['xml_param']);
var_dump($xml);
/** PHP5 */
$sxe = simplexml_load_string($xml);
foreach ($sxe as $item) {
var_dump($item);
}
echo "</pre>";
?>
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc