I have a PHP file that reads an XML file and uses a for loop to display the data as HTML5 <article>
objects. All that works like a champ. The problem I'm having seems to be in relation to the data in the XML file itself. My data is similar to this:
<articles>
<article>
<num>1</num><text>This is one.</text>
</article>
<article>
<num>2</num><text>This is <a href='./two.htm'>two</a>.</text>
</article>
<article>
<num>3</num><text>This is three.</text>
</article>
</articles>
I load the XML like this:
$xml = simplexml_load_file("./articles_test.xml");
The output looks like this:
This is one.
This is .
This is three.
I've tried escaping, quoting, using HTML entity names and a number of other things to no avail. Appreciate the help. Thanks.