PHP with XML

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have an XML File like:
<xml version=1.0>
               <name> Goldking </name>
                <description>Made of Gold. </descripton>
               <name> SilverKing </name>
                 <description> Made of Silver. </descripton>

I wish to read
1) All the Name and to be displayed.
2) Get the description for a particular name.

Can we use PHP to raed this data? How it could be acheived?

This Qn has raised to learn / understand XML with PHP..

Thanks in Advance..  

Re: PHP with XML

You have also posted an unapprehensible version of this question in
"Professional PHP Developers". You should really check out the
SimpleXML extension.

Re: PHP with XML

Yannis Rizos wrote:
Quoted text here. Click to load it

Or look for clsParseXML on the web.

Re: PHP with XML

On Tue, 12 Sep 2006 05:09:14 -0700, Goldking wrote:

Quoted text here. Click to load it

I use <

You have to write your own code to walk the resulting data structure, but
PHP makes that easy.


  ,>/'_          o__
  (_)\(_)        ,>/'_        o__
Yan Seiner, PE  (_)\(_)       ,>/'_     o__
Certified Personal Trainer   (_)\(_)    ,>/'_        o__
Licensed Professional Engineer         (_)\(_)       ,>/'_
Who says engineers have to be pencil necked geeks?  (_)\(_)

Site Timeline