simplexml question.
| From: | postmaster at kende dot com | Date: | Tue, 26 Oct 2004 22:23:41 +0000 |
| Subject: | simplexml question. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-200387@lists.php.net to get a copy of this message | ||
Hello,
I looking to get the data out of this test.xml file but dont
know how to get the data out because of the "bo:" namespaces.
If I remove all "bo:" from the xml then it works fine...
Is anyone can tell me how to do it?
<?php
$file = "test.xml";
$xml = simplexml_load_file($file) or die ("Unable to load XML file!");
echo "Name: " . $xml->UserAuthRequest->UserLoginName . "\n";
?>
test.xml:
<?xml version="1.0" encoding="UTF-8"?>
<bo:TXLife xsi:schemaLocation="http://ACORD.org/Standards/Life/2
TXLife2.9.90.XSD" xmlns:bo="http://ACORD.org/Standards/Life/2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<bo:UserAuthRequest>
<bo:UserLoginName>Test login</bo:UserLoginName>
Thanks,
Andras Kende