XML parsing

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

 



Hi,

 

When I go thru this documentation the parsing seem to be very complex. With
Java this was not the case.

 

Assume I have XML like this:

 

$xml = '<greeting><from>Peter</from><to>The group</to></greeting>';

 

I would like to get the value of 'from' and 'to'.

 

My dream function would be:

 

$from = xml_function($xml, 'from');

$to = xml_function($xml, 'to');

 

Or maybe an function that create an array from the XML:

 

$arr = xml_to_array($xml);

 

Any one who can give a really SIMPLE example of this?

 

I would LOVE you.

 

 

 

 

 


[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