Share via

XMLReader Escape characters automatically converted

BlueCoder123 21 Reputation points
2022-06-28T16:57:22.227+00:00

I am working on a project that heavily uses XMLReader and loads data from an XML file.

When the data is read and contains and escape character.. e.g "

It automatically gets converted to a quote ".

Is there a way to stop this behavior without having to reprocess the data to put the escape commands back in.. So that the raw string with the original text "

Thanks for any help.

Developer technologies | .NET | Other
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

0 comments No comments

Answer accepted by question author

Bruce (SqlWork.com) 84,086 Reputation points
2022-06-28T21:51:44.003+00:00

in a word, no.

the xml reader parses the xml string to build the xml node values. the node values do not have any quoting. when the tree is written back to a string (xml writer) required quoting as used as needed.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.