Hey,
I've been searching for quite some time now for a sample script depicting how to take values from an xml file, and store them as PHP variables. For example:
Take this simple xml
<resource type="Tutorial">
<title>Web Tutorial</title>
<author>Steve</author>
<url>http://www.whatever.com</url>
<language name="HTML" />
<language name="PHP" />
</resource>
and turn it into something like:
while (parsing the xml) {
$resource = "xml value here";
$title = "xml value here";
$author = "xml value here";
$url = "xml value here";
$languages = "xml value here"; //array
echo "Echo variables here";
}
I'm just trying to allow for flexibility in formatting the results. Is this possible? Does it make sense? Sorry guys, I'm totally new to XML parsing, but I would really appreciate it if you could send me in the right direction.
Also, does anyone know of a reference guide for referring to specific nodes in the hierarchy? Thanks a lot in advance.