I've been trying to figure out how to parse an xml file using PHP and to output some HTML.
I followed an example from joemarini.com
Display a List of Categorized Links with PHP, XML, and SAX
The example xml being parsed is only showing tags with attributes, but not with text values within the tag pairs. So I see how to apply the php example to xml that looks like this:
<tagname>
<tag1 attr="foo">
<tag2 attr1="one" attr2="two"></tag2>
</tag1>
</tagname>
but not to xml that looks like this:
<tagname>
<tag1 attr="foo">
<tag2 attr1="one" attr2="two">SOME TEXT VALUE ADDED HERE</tag2>
</tag1>
</tagname>
Basically I want to modify the php example so that it allows me to not only store and do something with the attribute values as it parses, but also the text values between the tag pairs. (Is this what is being called the CDATA everywhere I look?) I have found examples that parse the values between tags and they look very different from the code example I have here that parses attribute values.
Any help is appreciated.
links.php
links.xml