p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

vs_dotnet thread: Re: Accesing XML in .NET


Message #1 by "Hlodver Tomasson" <hlodver@h...> on Tue, 12 Jun 2001 14:28:21
If you are using VS.net you have to add a reference 
to the System.XML.dll (project->Add reference...)
(I assume youŽll have to do that in any other IDE
It is not enough to write: "using System.Xml;" at 
the top of the file.)

> Hi
> 
> I've tried opening an XML file using the sample from "A Preview of ASP+" 
to open an XML file using C#. The sample from the book is:
> 
> ---
> DataSet ds = new DataSet();
> FileStream fs;
> StreamReader xmlStream;
> 
> fs = new FileStream("settings.xml", FileMode.Open, FileAccess.Read);
> xmlStream = new StreamReader(fs);
> 
> ds.ReadXml(xmlStream);
> 
> fs.Close();
> ---
> 
> I have install VS.NET, and made a small winapp, but when I compile i get 
the following error:
> 
> ---
> Cannot find a definition for referenced type 'System.Xml.XmlReader'
> ---
> 
> Could anyone please tell me what is wrong, cause I doesn't have any idea.
> 

  Return to Index