Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old May 5th, 2005, 2:29 PM   #1
dark_omen
Hobbyist Programmer
 
Join Date: Dec 2004
Posts: 125
Rep Power: 4 dark_omen is on a distinguished road
Send a message via AIM to dark_omen
working with xml and c# and get this error

Hello,

I am working with xml and c# and I ge this error: The data at the root level is invalid, when I try to read the xml document. Here is the code that I am working with:

public static Response Message(string doc)
{
         StringReader reader = new StringReader(doc);
         XmlTextReader textReader = new XmlTextReader(reader);
         XmlDocument xmlDoc = new XmlDocument();
         xmlDoc.Load(textReader);  //gets stuck here
         return Response.Message(xmlDoc);
}

Any ideas on what this problem could be would be great.
Thanks in advance
dark_omen is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:24 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC