I wasn’t absolutely sure of where to put this post, here, in XML, or on the PHP listserv. I decided to start here.
Basically I have the configuration file to a site written in XML which I want to parse with PHP, and take those values and put them into action on a per-page basis. This I do through a couple of classes I wrote. My question arises due to the seemingly, cumbersome nature of how I managed to get the config settings out of the XML and into my PHP classes. To me it seems much to complex for PHP and I think I’m going about it in the wrong way. I will admit though, It is my first experience parsing XML with PHP so it may just seem complex since it is unfamiliar.
Here is an examle of my settings file: [url]http://blacknute.com/site_defaults.xml
And here is what I came up with to parse it: [url]http://blacknute.com/test.phptxt
It currently only retrives the data in the config area of the document, and if it was that complex to assemble setting and value pairs, I’m afriad getting links generated might be a little scary.
So, my basic question is, am I going about this the right way?
thanks!
–nathan