문제

I'm creating xml-like mark-up language using System.Xml.XmTextWriter that will be read by a third party app.

In this mark-up language, symbols > and < when inside an element, need to show up as, but the XmlTextWriter converts them to &gt ; and &lt ; (no spaces, I just added those because of formatting on here).

Any ideas on how to prevent this while still working with XmlTextWriter?

도움이 되었습니까?

해결책

You can output raw XML (no escaping) with the XmlTextWriter.WriteRaw method.

http://msdn.microsoft.com/en-us/library/z7sb8fsy.aspx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top