On Fri, Oct 22, 2010 at 1:19 PM, TR Shaw <tshaw@xxxxxxxx> wrote: > > On Oct 22, 2010, at 12:03 PM, Adam Richardson wrote: > > > On Fri, Oct 22, 2010 at 11:47 AM, TR Shaw <tshaw@xxxxxxxx> wrote: > > > >> Anyone have an idea how to work around this? I tried: > >> > >> define ('reg', '®'); > >> define ('®', '®'); > >> > >> can't figure how to override the entity table. Errors follw: > >> > >> Warning: simplexml_load_string(): > >> > o.cc/46/e53d68e007fd45c2fccb502f2e7ccad5.php?user_id=47&sub_id=61862469® > ; > >> in checkifup.php on line 5119 > >> > >> Warning: simplexml_load_string(): > >> ^ in checkifup.php on line 5119 > >> > >> Warning: simplexml_load_string(): Entity: line 220: parser error : > Entity > >> 'reg' not defined in checkifup.php on line 5119 > >> > >> Warning: simplexml_load_string(): > >> > /office/e53d68e007fd45c2fccb502f2e7ccad5.php?user_id=47&sub_id=89877485® > >> in checkifup.php on line 5119 > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > Does doing a str_replace and changing it to the corresponding entity > number > > (®) before parsing with simple_xml work? > > > > Here's a more robust function: > > > http://www.sourcerally.net/Scripts/39-Convert-HTML-Entities-to-XML-Entities > > > > Thanks Adam I know I can read and deal with it befor passing to the parser > but I thought that was klugie unless that's the only workaround I can find. > > Tom > > > XML only has 5 pre-defined entity references: http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references Although you can entities via a DTD, SimpleXML is not DTD aware, so this won't work. That's why you'll have to use the numeric character reference. Sorry, Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com