public XReader(string xmlfile) { rootDoc = new XmlDocument(); if (!File.Exists(xmlfile)) { StreamWriter sw = File.CreateText(xmlfile); sw.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); sw.WriteLine("<root></root>"); sw.Close(); } rootDoc.Load(xmlfile); fullPath = xmlfile; nodePtr = new XReader(); Load(rootDoc, NodeReaderType.Node, true); }
public XReader(XmlDocument xdoc) { rootDoc = xdoc; fullPath = null; nodePtr = new XReader(); Load(rootDoc, NodeReaderType.Node, true); }
public override object AddValue(string key, object value) { object o = base.AddValue(key, value); XReader rlt = new XReader(o, rootDoc); return rlt; }