note 43202 deleted from function.xml-parse-into-struct by vincent

From: Date: Mon, 14 Jun 2004 06:23:28 +0000
Subject: note 43202 deleted from function.xml-parse-into-struct by vincent
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71029@lists.php.net to get a copy of this message
Note Submitter: sdh33 at cornell dot edu ---- I used the algorithm from stephane for writing back to a file, but ran into the following problem. My original XML looks like <ENTRY id="1"> ... </ENTRY><ENTRY id="2"> ... </ENTRY> This got saved back as <1> ... </1><2> ... </2>, which expat doesn't agree with. So I propose the following modification. Right after the "foreach" in writeXmlToFile, I add if (preg_match("/\A[0-9]/",$name)) { $name = "ENTRY id=\"$name\""; } where clearly the "ENTRY" would need to fit whatever the intended use. It's a small fix, but could help.

« previous php.notes (#71029) next »