Home  |  Linux  | Mysql  | PHP  | XML
From:TerryA Date:Sun Feb  7 08:14:37 2010
Subject:Re: simplexml - can it do what I need?

Hi Shawn
Thanks for answering my query. I have looked at the suggestions:

$xml = simplexml_load_file('file.xml', 'SimpleXMLElement', LIBXML_NOCDATA);

I am/was able to load the file OK and to access the data by iteration.
However, I can't find a way to extract data by attributes. I need something
like $string=<element idtype="11" lang="fr" label="Description - Etage">.
Obviously, that won't work but that's the result I need. How do I get the
data out of one of these elements by specifying its idtype and lang? I've
google for hours on this and for another hour on SimpleXMLElement.

Terry
--
View this message in context: http://old.nabble.com/simplexml---can-it-do-what-I-need--tp27481222p27486649.html
Sent from the PHP - General mailing list archive at Nabble.com.

Navigate in group php.general at sever news.php.net
Previous Next


Your recent visits
=?utf-8?B?UHJvYmxlbSB3aXRoIGJsb2NraW5nIHN0cmVhbXMgaW4gUEhQ?=
Re: [PHP] web sniffer
Re: [PHP] Warning?
[PHP] Re: Help with regex (search/replace) please
Re: confirm subscribe to php-general@lists.php.net



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants