public XmlFileServiceTest()
        {
            var xmlFileService = new XmlFileService();

            xmlFileEntity01 = xmlFileService.LoadXmlFile(@"Data\Services\01\data01.xml");
            xmlFileEntity02 = xmlFileService.LoadXmlFile(@"Data\Services\01\data02.xml");
        }
Beispiel #2
0
        public XmlFileEntity LoadXmlFile(string fileName)
        {
            var xmlDoc        = XDocument.Load(fileName);
            var rootNode      = new XmlNodeEntity(xmlDoc.Root.Name.LocalName, xmlDoc.Root.Value);
            var xmlFileEntity = new XmlFileEntity(rootNode);

            var childrenNodesFromRoot = GetChildrenNodes(xmlDoc.Root);

            childrenNodesFromRoot.ForEach(x => xmlFileEntity.RootNode.AddChildNode(x));

            return(xmlFileEntity);
        }