mirror of
https://github.com/ZuneDev/MicrosoftIris.git
synced 2026-07-27 13:13:29 -07:00
Added workaround for rich text XML parsing
This commit is contained in:
@@ -1033,7 +1033,11 @@ namespace Microsoft.Iris.ViewItems
|
|||||||
uint num = 0;
|
uint num = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (ManagedXmlReader nativeXmlReader = new ManagedXmlReader(content, true))
|
// Wrap the content in a `root` element, because .NET's XML parser
|
||||||
|
// is more strict about root elements than XmlLite. Strings that contain
|
||||||
|
// more than one root element (i.e. "<keyword>term</keyword> <header>results</header>")
|
||||||
|
// will fail to parse.
|
||||||
|
using (ManagedXmlReader nativeXmlReader = new ManagedXmlReader($"<root>{content}</root>", true))
|
||||||
{
|
{
|
||||||
MarkedRange markedRange1 = null;
|
MarkedRange markedRange1 = null;
|
||||||
XmlNodeType nodeType;
|
XmlNodeType nodeType;
|
||||||
|
|||||||
Reference in New Issue
Block a user