Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-Id: <2034437.qChMirdbgy@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Wed, 20 Apr 2011 10:51:36 +0200 User-Agent: KNode/4.4.7 Content-Transfer-Encoding: 8Bit Subject: Re: Adding a CDATA section Newsgroups: comp.lang.php References: <1854315.SyKVeVyVuy@PointedEars.de> <83f1ea86-c11d-4242-b0f8-29cb7cdc8bf1@j35g2000prb.googlegroups.com> Followup-To: comp.lang.php MIME-Version: 1.0 Lines: 78 NNTP-Posting-Date: 20 Apr 2011 10:51:37 CEST NNTP-Posting-Host: b96fbbd1.newsspool2.arcor-online.net X-Trace: DXC=o=E]3>\55WMj7E:bke<5HFA9EHlD;3YcB4Fo<]lROoRA8kF Thomas 'PointedEars' Lahn wrote: >> Adam Harvey wrote: >> > JustWondering wrote: >> >> What I'm expecting is: >> >> >> >> >> >> yummy]]> >> >> >> >> >> >> >> >> > I'm not really sure why you'd expect that dash in , but at any >> > rate, running your code on a current PHP 5.3 build results in what I'd >> > expect, which is: >> >> > >> > >> > >> > yummy]]> >> > >> > >> > >> >> > What version of PHP are you running? >> >> PHP is not the issue here, but that the OP has not understood what XML is >> (and how it is to be used), what a CDATA section is (that its content is >> *not* parsed except for `]]>', and so cannot possibly display bold >> because of in it), and that Firebug's innerHTML-based Edit >> feature is shaky at best with XML documents served as text/html. >> >> Something along >> >> header('Content-Type: text/xml; charset=UTF-8'); >> >> is missing after >> >> > >> but that would still not display anything of the markup in bold. (And >> that is good so.) > > Perhaps you should read the post before making up assumptions about > the OP. I really do not have to make assumptions in this case. It is very obvious that you do not know what you are doing. > Where did I say that I'm expecting to see bold? In your OP. Precisely: >>> What I'm expecting to see is Apples are yummy, with yummy in bold. > I am pointing to the generated XML code, not how the generated code is > displayed. Then you should have said so. XML is not (X)HTML; a `b' element has no inherent meaning there. And when `' is in a CDATA section, it does not constitute an element at all. > Why would I expect anything in a CDATA section to be displayed? You should expect the content of a CDATA section to be displayed verbatim because that is how it works. You are not expecting it because evidentially you have not understood what a CDATA section is, and how XML works. Please trim your quotes to the relevant minimum. PointedEars -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from (404-comp.)