开发者

Apostrophe contained within XML returned from a webservice

开发者 https://www.devze.com 2023-02-17 04:24 出处:网络
I am consuming a web service that has an apostrophe contained within the namespace, which is causing problems for simplexml.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消