[Mono-list] XML Read() statement

Michael Schwery cleamcpb@hotmail.com
Wed, 19 Feb 2003 22:41:51 +0000


I'm trying to read a XML file with the following code, but it keeps looking 
for a url based file.
What do I have to change?

void ReadXML()
{
	string tagName;
	try
	{
		XmlTextReader reader = new 
XmlTextReader("/App/EBook/Glade_Ebook/Ebook.glade");

		while (reader.Read())
		{
		tagName = reader.Name;
		if (tagName == "property")
		{
			for (int i = 0; i < reader.AttributeCount; i++)
			{
				reader.MoveToAttribute(i);
				Console.WriteLine(reader.ReadString());
				}
			}
		}


	}
	catch (System.Exception Error)
	{
		Console.WriteLine (Error.ToString());
	}

}








_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail