I receive a an xml string from third party. The xml string contains invalid characters like & and ‘. I am trying to put it in dataset (ASP.NET). it throws error. Can anyone pls help.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Tell/ask the third party to provide valid XML.
Interoperability standards don’t count for much when they aren’t adhered to. If they are passing you invalid characters today, what’s to stop them from passing mismatched nodes tomorrow? or no tags at all?
If there is no standard, then there are an endless number of scenarios for which you might need to code around.
That said, you can:
Per the OP’s comment, here is a very, very simple example of a somewhat configurable find/replace.