RE: [PEAR-DEV] XML_Functions

From: Date: Wed, 31 Mar 2004 14:46:44 +0000
Subject: RE: [PEAR-DEV] XML_Functions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26894@lists.php.net to get a copy of this message
Le mer 31/03/2004 à 16:28, Stephan Schmidt a écrit : > Hi, > > > 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. 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 ? > > > I have put theses lines into the Functions.php file (with the > > class), is > > you think is a good way ? or is theses lines *must* always add by the > > developpers in each php files ? > I don't think, that the developer should do this. > > IMHO I do not think that this should be added to PEAR. You can easily > create XML tags with XML_Util or use XML_Serializer for this. > > All this package does is mapping the method name to a tag name, the rest > can be done with existing packages. You are right, but this package is made for writing valid HTML page easily. Many perl developpers don't use directly the tags like this : print "<a href='#'> <b>myURL</b> </a>" but uses the mod_cgi like this : print a({href=>'#'}, b("myURL")) Why ? because this method make a valid code. It's impossible to forget an </tag>, or the end / of <br /> or cross close tags like this : <b><i>Hello</b></i> > > Just my 2 cts. > > Stephan

« previous php.pear.dev (#26894) next »