Apostrophe contained within XML returned from a webservice
I am consuming a web service that has an apostrophe contained within the namespace, which is causing problems for simplexml.
eg. xmlns="Apostrophe's here/Foo/Bar"
I've tried addslashes
but it doesn't seem to work because the string has already been returned containing the unescaped/encoded apo开发者_JAVA百科strophes and causes an error before addslashes can be run.
It strikes me as being a bit of a flaw within the web service itself. Am I right to think that? I do like a correctly placed apostrophe but it would seem as if it's more trouble than it's worth in this instance.
精彩评论