DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   How do i open a XML file? (http://www.daniweb.com/forums/thread152174.html)

FallenPaladin Oct 19th, 2008 3:23 pm
How do i open a XML file?
 
Hi

please can someone help? I have been pulling my hair out for days trying to understand how to open a XML data store in an application. I don't understand the basic principles, as i have opened it int a dataset using readXml, but then been unable to access any of the data. I have then tried creating an XmlDataDocument, with a schema, but was unable to open as there was a conflict with the root element. Please can someone help. I have read alot of the MSDN stuff but was not really able to fully understand it.

Thanks

LizR Oct 19th, 2008 4:34 pm
Re: How do i open a XML file?
 
Why not be more helpful and give an example of your XML as well as your failing code.

Jugortha Oct 29th, 2008 2:51 pm
Re: How do i open a XML file?
 
Ok,

using System.Xml;

xmlDocument oDoc = new xmlDocument();

oDoc.load(/*put the xml path here*/);

then you can handel the targeted xml file within your application

or you can use an XmlTextReader object it performs the same task

Here is a link to a good tutorial for this


All times are GMT -4. The time now is 9:01 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC