Re: XML_Functions
| From: | Davey | Date: | Thu, 01 Apr 2004 13:08:27 +0000 |
| Subject: | Re: XML_Functions | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26958@lists.php.net to get a copy of this message | ||
Guillaume Lecanu wrote:
Le mer 31/03/2004 à 16:28, Stephan Schmidt a écrit :Guillaume, You must only EVER have < and > and & in HTML or XML when marking up tags (i.e. <html>) and entities (i.e. &) - failure to do so will create invalid markup. You should therefore HTMLentities() any CDATA (the contents of attributes and tags, i.e. <tag attr="CDATA">CDATA</tag>) Simple reason: How to know that if you have this in the OUTPUT of an HTML or XML page "in this code: $foo < $bar but > $baz" that "< $bar but >" is not an HTML/XML tag? the parse will check it. Additionally, in this: "I shot him & that was that;" how do you know that it's not referenceing the entity "that was that"? - Davey p.s. Make PHP5 a dependency of the package (as it will not run at ALL without it) and the check for "overload" etc is not needed.Hi,The output is principaly for generating HTML pages but can be used for make an XML file. For make a valid HTML page, i have never heard to replace < > with their entities equivalent.. have you a link about this please ?This method make a valid XML contents.It does not in the code you are currently using. You should replace &, <, >, ' and " with their respective entities or use XML_Util to create the tags.