How do i open a XML file?

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Oct 2007
Posts: 48
Reputation: FallenPaladin is an unknown quantity at this point 
Solved Threads: 0
FallenPaladin FallenPaladin is offline Offline
Light Poster

How do i open a XML file?

 
0
  #1
Oct 19th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: How do i open a XML file?

 
0
  #2
Oct 19th, 2008
Why not be more helpful and give an example of your XML as well as your failing code.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 172
Reputation: Jugortha is an unknown quantity at this point 
Solved Threads: 16
Jugortha Jugortha is offline Offline
Junior Poster

Re: How do i open a XML file?

 
0
  #3
Oct 29th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC