public void Setup() { xmlParse = new XmlParse(); var currentDirectory = Directory.GetCurrentDirectory(); var correctImportFilepath = $"{currentDirectory}\\xml\\CorrectInput.xml"; xDocument = XElement.Load(correctImportFilepath); }
public static void LoadFromFile(string strFileName, IXmlParse parseOne, bool isEnd = true) { CTimeProfiler.Begin(string.Format("{0}.Load", strFileName)); XmlReader Xmldoc = GetXMLReader(strFileName); while (Xmldoc.Read()) { if (IsReadContinue(Xmldoc)) { parseOne.ParseOne_Reader(Xmldoc); } } Xmldoc.Close(); Xmldoc = null; if (isEnd) { CTimeProfiler.End(string.Format("{0}.Load", strFileName)); } }
public XmlOperations(IXmlValidation xmlValidation, IXmlParse xmlParse) { this.xmlValidation = xmlValidation; this.xmlParse = xmlParse; }