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.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,360 questions
C#
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.
10,226 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 55,366 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.

    0 comments No comments

0 additional answers

Sort by: Most helpful