Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- escaping colons in strings
- Chris Browne
March 26, 2008, 4:10 pm
rate this thread
I am trying to write to an XML file, but it will not allow me to use a
colon. Is there some way to be able to write the colon to the XML?
PHP code -
$point = "something"
XML it creates -
(misses the the 'new' all together)
Any ideas would be great,
Re: escaping colons in strings
You're not just writing a colon here; you're making a "point" element of
namespace "new". I don't think SimpleXML will handle defining your own
namespace (it looks like you're using SimpleXML) and you'll have to use
DOM instead, see: