public class DataUtil
{
public static ProductInfo GetInventoryInfo(string sku)
{
string filename = "Products.xml";
XElement e = PackageUtil.GetXmlDocFromDefaultPackage
(filename); // This is the line I get the error.
}
}
namespace SLUtil
{
public class PackageUtil
{
public static XElement GetXmlDocFromDefaultPackage(string
filename)
{
XmlReaderSettings settings = new XmlReaderSettings();
settings.XmlResolver = new XmlXapResolver();
XmlReader reader = XmlReader.Create("Products.xml");
XElement element = XElement.Load(reader);
return element;
}
}
}
The namespace above is at the top of the file and I am trying to use
the function but I get this error. Anyone know how to resolve this ?
Thanks,
All help appreciated