Forums

This topic is locked

How do I convert HTML code to XML friendly data?

Posted 07 Dec 2010 10:56:52
1
has voted
07 Dec 2010 10:56:52 bayldon smith posted:
I have a PHP page that parses data from an XML file and places it in my landing page. Obviously XML prohibits the use of "<" and ">". So my question is, are there any utilities or tools that could automate the conversion of HTML code to XML friendly data.

Example:
convert: <img src="picture.jpg">
to: &[html entity code for <];img src="picture.jpg"&[html entity code for >];

Reply to this topic