Hi ReVo, $__header contains a string of the first line in the xml. this will usually contain something like xml version="1.0" encoding="UTF-8" since the tag characters are stripped away. But it may also contain the whole of, or part of, the xml since xml files are valid without any whitespace.
Alternative 2 is not an option since I want to find out what charset the xml is, not just set the attributes in the Xml object. I want to know the charset so I can properly convert all text in the xml for display. Using SimpleXML (or "ComplicatedXML" for php4) sort of defeats the purpose. I am not doing something very complicated but It would suck to have to toss Cake's Xml and use something else. I think I would rather just edit the Xml class to store these values if it is in fact a missing or "broken" functionality. Sorry, i am a but cranky... time for some food I guess. Thank you for your suggestions. /Martin On Jan 22, 4:08 pm, RoVo <[email protected]> wrote: > Hi Martin, > > the header is stored in: > var $__header = null; > may be, it's only used in the header-function of xml.php?!? > > but alternatively you can use the option-param e.g.: > $rss = new XML($url_to_an_rss_feed, array('encoding'=>'ISO-8859-1') ); > > If you have PHP5, as well you can use SimpleXML - like > Tim:http://debuggable.com/posts/parsing-xml-using-simplexml:480f4dfe-6a58... > > Hope that helps > RoVo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
