Bug 4748 - Error autoformatting new XML file
Summary: Error autoformatting new XML file
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Mac OS
: Low minor
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-04-30 11:05 UTC by Mikayla Hutchinson [MSFT]
Modified: 2015-11-17 01:12 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mikayla Hutchinson [MSFT] 2012-04-30 11:05:45 UTC
The XML autoformatter has an error formatting the default XML file template.

WARNING [2012-04-26 21:48:30Z]: Error formatting XML file
System.Xml.XmlException: Document element did not appear.  Line 2, position 1.
  at Mono.Xml2.XmlTextReader.Read () [0x0017d] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.XML/System.Xml/XmlTextReader.cs:633 
  at System.Xml.XmlTextReader.Read () [0x0006b] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.XML/System.Xml/XmlTextReader2.cs:564 
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00363] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.XML/System.Xml/XmlDocument.cs:1021 
  at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00032] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.XML/System.Xml/XmlDocument.cs:868 
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00019] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.XML/System.Xml/XmlDocument.cs:738 
  at System.Xml.XmlDocument.LoadXml (System.String xml) [0x0002d] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/System.XML/System.Xml/XmlDocument.cs:761 
  at MonoDevelop.Xml.Formatting.XmlFormatter.FormatXml (MonoDevelop.Ide.Gui.Content.TextStylePolicy textPolicy, MonoDevelop.Xml.Formatting.XmlFormattingPolicy formattingPolicy, System.String input) [0x00006] in /Users/michael/Mono/monodevelop/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.Xml.Formatting/XmlFormatter.cs:45
Comment 1 Mike Krüger 2012-05-08 03:08:29 UTC
The template is an empty xml, that should be handled.

Is this a xml text reader bug ? I haven't tried it on windows yet.
Comment 2 xamarin-release-manager 2015-11-17 01:12:13 UTC
Fixed in version (roslyn)

Author: Mike Kr??ger
Commit: d27b9fc410c43f304668ab2dfbd57dc0bb8d1e45 (mono/monodevelop)