0
votes

I'm going nuts trying to simply work with xml file in Visual Studio 2005. If I create a new *.xml file and add it to the project then a gray screen gets displayed instead of the file contents. This screen shows the message "This XML document is not well formed. It contains the following error: Root element is missing". It seems like the XML tools build into Visual Studio 2005 have hijacked this file and it's now impossbile to simply look at the file and manipulate like any other text based file. There is a clunky work around where I do a right click open it with HTML editor. I'm able to work with XML files with no such problems on my machine at work which has Visual Studio 2008.

3
I closed the project and opened it and now this is appearing. s114920633.onlinehome.us/misc/screenprint.png But what I'm wishing for is this msdn.microsoft.com/en-us/library/… - JoeT

3 Answers

1
votes

It looks like you've lost association with your default xml template or xml editor. When you click "Open With", do you see the Xml Editor or Xml Schema Editor at all? These should both be available to you. You may need to perform a restore on these templates.

0
votes

dragging a file onto vs2005 doesn't work?

0
votes

Try do a add the File via the menu. File->New File-> XML File.

Alternatively you could try to add some kind of root node yourself like: . (To do that open the file with notepad.)