Dealing with XML in PHP -


i'm working project has me working xml lot. have take xml response , decrypt each text node , various tasks data. problem i'm having taking response , processing each text node. using xmltoarray library, , worked fine change xml array , loop through array , decrypt values. of xml response i'm dealing have repeated tags , xmltoarray library return last values.

is there way can take xml response , process text nodes , putting values array has similar structure response?

thanks in advance.

i use simplexml.

here's small example of using it. loads , parses xml http://www.w3schools.com/xml/plant_catalog.xml , outputs values of "common" , "price" tags of each "plant" tag.

$xml = simplexml_load_file('http://www.w3schools.com/xml/plant_catalog.xml'); foreach ( $xml->plant $plantnode ) {     echo $plantnode->common, ' - ', $plantnode->price, "\n"; } 

if have problems adapting needs, give example of xml can it.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -