How to get all XML elements in PHP (including supplementary information inside tags)

sami-sounine

New Member
I have the following XML code that I grab from an external site:\[code\]<source> <url>http://externalsite.com</url> <widget id="1"> <title>Title1</title> </widget> <widget id="2"> <title>Title2</title> </widget> <widget id="3"> <title>Title3</title> </widget> <widget id="4"> <title>Title4</title> </widget> <widget id="5"> <title>Title5</title> </widget></source>\[/code\]How would I get the \[code\]id\[/code\] and \[code\]title\[/code\] of each widget in PHP?
 
Back
Top