I am trying to send all data to xml through php. But somehow XML parses the data and in Password it finds &
and replaces it with &
after that data is posted through Curl. So is there any method / technique to avoid &
in xml. Or it goes as it is. I am tried almost all encoding functions.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use the CDATA Section to make it leave the ampersand unchanged.
回答2:
In the normal course of events, & in the data is encoded as &
in the XML, and the XML parser decodes this and presents it as &
to the application. If the application (curl?) is seeing it as &
this is either because it has been double-escaped in the XML (as &
) or because it is not being read using a real XML parser.