Example #1
0
        public void Setup()
        {
            xmlParse = new XmlParse();
            var currentDirectory      = Directory.GetCurrentDirectory();
            var correctImportFilepath = $"{currentDirectory}\\xml\\CorrectInput.xml";

            xDocument = XElement.Load(correctImportFilepath);
        }
Example #2
0
    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));
        }
    }
Example #3
0
 public XmlOperations(IXmlValidation xmlValidation, IXmlParse xmlParse)
 {
     this.xmlValidation = xmlValidation;
     this.xmlParse      = xmlParse;
 }