Quantcast
Viewing all articles
Browse latest Browse all 27

CREATED ISSUE: XPathDocumentWriter::WriteRaw escapes XML when it shouldn't

The WriteRaw method of the XPathDocumentWriter escapes the XML brackets < and > to &lt; and &gt; It seems that it behaves exactly as WriteString does.

Steps to reproduce:

XPathDocumentWriter xw = new XPathDocumentWriter();
xw.WriteStartElement("root");
xw.WriteRaw("<item>test</item>");
xw.WriteEndElement();
xw.Flush();
XPathNavigator xn = xw.Close();
Trace.WriteLine(xn.OuterXml);

The output is:

<root>&lt;item&gt;test&lt;item&gt;</root>

Whereas it should be:

<root><item>test</item></root>

Viewing all articles
Browse latest Browse all 27

Trending Articles