Re: simplexml question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



postmaster@xxxxxxxxx wrote:

> 
> 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

I couldn't get SimpleXML (nor the SimpleXMLIterator) to work with NS-enabled
xml.  Had to use DOM functions.  Sorry if this is bad news.  Would be
interested if I missed a setting that enabled NS-support for SimpleXML.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux