Page 1 of 1

SimpleXML not recognizing predifined XML entities

Posted: Sun Aug 30, 2009 6:10 pm
by pedrotuga
I am not quite getting this behaviour, isn't it part of the XML specification itself should handle the five predefined entities?

I have this in my XML file

Code: Select all

 
<?xml version="1.0"?>
<xml>
  <el attr="<&rt;">
  </el>
</xml>
 
then when i try to load it into a SimpleXML object like this:

Code: Select all

simplexml_load_file('test.xml');
I get this error

Code: Select all

parser error : Entity 'rt' not defined
What am I missing in here?

Re: SimpleXML not recognizing predifined XML entities

Posted: Sun Aug 30, 2009 6:50 pm
by requinix
&rt; is not an entity. Are you thinking of >?

Re: SimpleXML not recognizing predifined XML entities

Posted: Mon Aug 31, 2009 4:47 pm
by pedrotuga
I was :banghead: :banghead: :banghead:

Thank you