![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
This last statement throws an InvalidOperationException with "There is an error in XML document (1, 92143)". The InnerException is "There is an unclosed literal string. Line 1, position 92143". I can't really think of a good way to get to position 92143 to see what the issue is. |
|
I tried messing around with creating an XmlWriterSettings object and changing the encoding to Unicode and turning of CheckCharacters, but no dice. |
#3
| |||
| |||
|
|
This last statement throws an InvalidOperationException with "There is an error in XML document (1, 92143)". The InnerException is "There is an unclosed literal string. Line 1, position 92143". I can't really think of a good way to get to position 92143 to see what the issue is. |
|
I tried messing around with creating an XmlWriterSettings object and changing the encoding to Unicode and turning of CheckCharacters, but no dice. |
#4
| |||
| |||
|
|
depa... (AT) bemis (DOT) com wrote: This last statement throws an InvalidOperationException with "There is an error in XML document (1, 92143)". The InnerException is "There is an unclosed literal string. Line 1, position 92143". I can't really think of a good way to get to position 92143 to see what the issue is. I tried messing around with creating an XmlWriterSettings object and changing the encoding to Unicode and turning of CheckCharacters, but no dice. Can you try to write out the XML with XmlWriterSettings and Indent set to true? Then perhaps you get an error message with a line number and a position which is easier to find than position 92143 in a single line. Other than that I don't think you need to use the MemoryStream, you can simply create an XmlNodeReader over your node e.g. serializer = New XmlSerializer(myObjct.GetType()) myObject = serializer.Deserialize(New XmlNodeReader(node)) I don't know obviously if that way the problem vanishes but you could try it and let us know. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ |
#5
| |||
| |||
|
|
depa... (AT) bemis (DOT) com wrote: This last statement throws an InvalidOperationException with "There is an error in XML document (1, 92143)". The InnerException is "There is an unclosed literal string. Line 1, position 92143". I can't really think of a good way to get to position 92143 to see what the issue is. I tried messing around with creating an XmlWriterSettings object and changing the encoding to Unicode and turning of CheckCharacters, but no dice. Can you try to write out the XML with XmlWriterSettings and Indent set to true? Then perhaps you get an error message with a line number and a position which is easier to find than position 92143 in a single line. Other than that I don't think you need to use the MemoryStream, you can simply create an XmlNodeReader over your node e.g. serializer = New XmlSerializer(myObjct.GetType()) myObject = serializer.Deserialize(New XmlNodeReader(node)) I don't know obviously if that way the problem vanishes but you could try it and let us know. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |