Skip navigation.

Netscape Is Dead! Long Live Netscape!All recent postsHow Do Color Blind People Perceive Color?

GetXml() Output Looking Better Already

Remember we talked about DataSet.GetXml() and its ugly formatting when dumped in the Immediate Window within Visual Studio.NET 2003 and 2005? My coworker, Ronnie, figured that Debug.Write ([DataSet].GetXml()), added to your code, prints it quite nicely in the output window.

Upon further tweaking, I discovered you can type the following in the Immediate Window (when in debug mode) and get the same nicely formatted XML document:

?System.Diagnostics.Debug.WriteLine ([DataSet].GetXml ())

The only drawback is that a dubious line, “Expression has been evaluated and has no value”, is appended to the output, but it’s a minor issue.

I still expect this bug fixed in VS.NET 2005!

Comments

Comment permalink 1 Zubin Girglani |
The WriteLine method is a subroutine rather than a function and therefore no value is returned. Placing the question mark before this line in the immediate window implies that a value is to be returned and outputted to the immediate window, which in this case is not true. What you want to do is type the line leaving out the question mark and the 'Expression has been evaluated and has no value' message will disappear.

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

TrackBacks

Sorry, TrackBacks are not allowed.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):