richcleverley
MIS
Hi,
I'm completely new to xml, but have been asked to write a php script to create an xml file from database enties.
Everything was going fine, I came up against a problem when there was a & sign in the database fields but worked that out by changing it to & but I now need to change a superscript 2 (to denote square metres - 10m²). I looked through and saw that I needed to replace this with ² which wasn't difficult (using php preg_replace function), but when I go to view the xml file I get the following error:
One of the lines in question is formed like this:
- This is only a part of the line as it's a big desription.
Can anyone point me in the right direction as to what I need to do; just the correct way to form the line would be fine, I'm not worried about the xml tags as I have them all sorted.
Thanks,
Richard
I'm completely new to xml, but have been asked to write a php script to create an xml file from database enties.
Everything was going fine, I came up against a problem when there was a & sign in the database fields but worked that out by changing it to & but I now need to change a superscript 2 (to denote square metres - 10m²). I looked through and saw that I needed to replace this with ² which wasn't difficult (using php preg_replace function), but when I go to view the xml file I get the following error:
Code:
Reference to undefined entity 'sup2'. Error processing resource '[URL unfurl="true"]http://path/to/file.xml'[/URL]
One of the lines in question is formed like this:
Code:
Big original villa, 276m ² /3050ft ² LA, 5 bedrooms, second villa 110m ²
Can anyone point me in the right direction as to what I need to do; just the correct way to form the line would be fine, I'm not worried about the xml tags as I have them all sorted.
Thanks,
Richard