Is there a way to have an XDocument object save its content and keeps the hexadecimal references as they are without parsing them?
Thank you for any help.
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.
No, that’s not possible as an XDocument doesn’t contain any hexadecimal references. The values are strings, so the characters are not kept as encoded XML entities.
When you load an XML document, the entities are decoded when the values are turned into strings. The strings only contains the characters, there is no information about how they once where encoded. So, it’s not possible to encode the characters the same way they were before they were decoded, as that information doesn’t exist in the XDocument.