SimpleXML and ADO XML
- From: "Álvaro G. Vicario" <webmasterNOSPAMTHANKS@xxxxxxxxxxxxxx>
- Date: Mon, 29 Sep 2008 20:21:59 +0200
I've spent an hour trying to make SimpleXML work until I realized the
problem seems to be namespaces. This code:
<?php
$xml = simplexml_load_file('foo.xml');
print_r($xml);
?>
works fine, unless the XML file contains tags with colons, e.g.:
<rs:data>
In this case, I get an empty object. What am I missing?
I need to parse third-party XML files. I believe it's ADO XML:
http://www.devarticles.com/c/a/XML/Displaying-ADO-Retrieved-Data-with-XML-Islands/2/
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com
--
.
- Prev by Date: Re: Can't addFile() in SimpleTest Test Suite
- Next by Date: SMF PHP error... Am I missing something subtle in the PHP language syntax?
- Previous by thread: Manually setting session ids
- Next by thread: SMF PHP error... Am I missing something subtle in the PHP language syntax?
- Index(es):
Relevant Pages
|