Re: xml to array

From: Date: Sun, 05 Feb 2006 11:32:39 +0000
Subject: Re: xml to array
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-229893@lists.php.net to get a copy of this message
Brian V Bonini wrote:
On Fri, 2006-02-03 at 16:23, Richard Lynch wrote:
I've got my money on the XML spec REQUIRING an alphabetic start to tagnames, and subsequent characters can be alphanumeric... In other words, it doesn't work because <0> is not a valid XML tag.
Yeah, that was my instinct too... Just could not find anything to confirm it after a quick browse through the spec. Though can you find anything in the spec via a quick browse.. ;-) However, after a closer look I still can't find (at least in plain English) anything that says this is NOT OK. Though the parser does return '[xml_error] => not well-formed (invalid token)'. Good stuff.... -Brian
Just a quick shot it the dark... http://www.w3.org/TR/REC-xml/#NT-Name Go up about a half page to this: "[Definition: A Name is a token beginning with a letter or one of a few punctuation characters, and continuing with letters, digits, hyphens, underscores, colons, or full stops, together known as name characters.] Names beginning with the string "xml", or with any string which would match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization in this or future versions of this specification."... From quick read maybe if you wrap the numbers in quotes that might work?

« previous php.general (#229893) next »