2013-03-25 20:33:33 +00:00

59 lines
1.5 KiB
C#

/*********************************************************************************************
* Copyright 2004 - Volian Enterprises, Inc. All rights reserved.
* Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
* ------------------------------------------------------------------------------
* $Workfile: MenuXML.cs $ $Revision: 2 $
* $Author: Jsj $ $Date: 5/17/05 11:52a $
*
* $History: MenuXML.cs $
*
* ***************** Version 2 *****************
* User: Jsj Date: 5/17/05 Time: 11:52a
* Updated in $/LibSource/Utils
* cleanup
*
* ***************** Version 1 *****************
* User: Kathy Date: 7/27/04 Time: 8:34a
* Created in $/LibSource/Utils
*********************************************************************************************/
using System;
using System.Xml;
using System.IO;
using System.Windows.Forms;
namespace Utils
{
/// <summary>
/// This class reads in an xml menu file, as input and creates an XmlDocument from it.
/// </summary>
public class MenuXML
{
private string menuFileName;
private XmlDocument xmlDoc;
public MenuXML(string fn)
{
menuFileName = fn;
try
{
xmlDoc = new XmlDocument();
XmlTextReader reader = new XmlTextReader(fn);
xmlDoc.Load(reader);
reader.Close();
}
catch (Exception e)
{
MessageBox.Show(e.Message.ToString(),"XML Menu Error");
}
}
public XmlDocument GetXmlDoc()
{
return xmlDoc;
}
}
}