I haven't used XmlTextReader, so I don't know for sure.

You could try the file URI "file:///"

Maybe something like:
"file:///App/EBook/Glade_Ebook/Ebook.glade"

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Michael Schwery
Sent: Wednesday, February 19, 2003 5:42 PM
To: [EMAIL PROTECTED]
Subject: [Mono-list] XML Read() statement


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

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to