Parsing XML with keys that have spaces in their names

clarkey

New Member
Does anyone know how to parse an xml string in php using SimpleXMLElement when the key has a space in it ?For example,\[code\]$xmlString = "<test><this is>a</this is></test>";$xml = new SimpleXMLElement($xmlString);print_r($xml);\[/code\]in the above example, 'this is' causes the parser to go bananas. I'm guessing its because it thinks its a property as is expecting like ??FOR A BONUS PT, (also if the key is a number.. like '1', the same thing happens)..
 
Back
Top