Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Error when trying to format a bad structured xml document

$
0
0

Hello,

I had an xml document bad formed with two root elements (my fault) and this exception rised when I tried to format (Ctrl+I) this document. For me is not a really bug is just that is not 'nice' to have an 'Unhandled exception' window.

Regards,

David

.NET Version        : 2.0.50727.42
OS Version           : Microsoft Windows NT 5.0.2195 Service Pack 4
Current culture      : Spanish (Spain) (es-ES)
Current UI language  : en-US
Working Set Memory   : 48360kb
SharpDevelop Version : 2.0.0.1591


Exception thrown:
System.Xml.XmlException: There are multiple root elements. Line 3, position 2.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlTextReader.Read()
   at ICSharpCode.SharpDevelop.DefaultEditor.XmlFormattingStrategy.TryIndent(TextArea textArea, Int32 begin, Int32 end)
   at ICSharpCode.SharpDevelop.DefaultEditor.XmlFormattingStrategy.IndentLines(TextArea textArea, Int32 begin, Int32 end)


Viewing all articles
Browse latest Browse all 1764

Trending Articles