The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Yes it is possible to do what you want, but it would be rather difficult. You would probably want to use regular expressions (regex, for short).

However a better way would be to format your data using an .xsl file. What this does is pretty much exactly what you're looking for. It formats an xml (data) file into html (presentation and data) by defining how the data should be presented. If you take the time to learn a bit about this, I'm sure you will be very pleased.

Hey, I found out that there is an easy way to do what you want if you're using version 5 of PHP. There's an extension called SimpleXML that will help you out greatly - it stores the xml elements like an array, which makes it easy to call them. Nevertheless, I still think that xsl stylesheets would be of more use to you, as they're built for exactly what you're doing.