public ArxmlElementNode(XmlNode SourceXmlNode, ArxmlElementNode ParentElementNode)
        {
            Node = SourceXmlNode;
            ParentNode = ParentElementNode;

            Name = FindShortName(SourceXmlNode);

            if (ParentNode == null)
            {
                AddressWithShortName = "/" + Name + " ";
            }
            else
            {
                AddressWithShortName = ParentNode.AddressWithShortName + "/" + Name + " ";
            }

            Attributes = new Dictionary<string, string>();
            if (SourceXmlNode.Attributes != null)
            {
                foreach (XmlAttribute Attribute in SourceXmlNode.Attributes)
                {
                    Attributes.Add(Attribute.Name, Attribute.Value);
                }
                AttributeNumber = SourceXmlNode.Attributes.Count;
            }

            ChildElementNodes = new List<ArxmlElementNode>();
            if (SourceXmlNode.ChildNodes != null)
            {
                int ElementNodeCouter = 0;
                foreach (XmlNode Node in SourceXmlNode.ChildNodes)
                {
                    if (Node.NodeType == XmlNodeType.Element)
                    {
                        ChildElementNodes.Add(new ArxmlElementNode(Node, this));
                        ElementNodeCouter++;
                    }
                }
                ChildElementNodeNumber = ElementNodeCouter;
            }

            if (ChildElementNodeNumber == 0)
            {
                Value = SourceXmlNode.InnerText;
            }
        }
 public MyArxmlDoc(string File)
 {
     XmlDocument Doc = new XmlDocument();
     Doc.Load(File);
     TopElementNode = new ArxmlElementNode(Doc.DocumentElement, null);
 }
 public Tuple<bool, bool> CompareNodeWithOutShortName(ArxmlElementNode TargetNode)
 {
     return Tuple.Create(HasAttributest == TargetNode.HasAttributest &&
                         HasChildElementNode == TargetNode.HasChildElementNode &&
                         HasShortName == TargetNode.HasShortName &&
                         HasSiblingElementNode == TargetNode.HasSiblingElementNode &&
                         HasValue == TargetNode.HasValue &&
                         SiblingElementNodeNumber == TargetNode.SiblingElementNodeNumber &&
                         AttributeNumber == TargetNode.AttributeNumber &&
                         ChildElementNodeNumber == TargetNode.ChildElementNodeNumber &&
                         Value == TargetNode.Value,
                         CompareChildNodes(TargetNode.ChildElementNodes));
 }
 public bool CompareNode(ArxmlElementNode TargetNode)
 {
     return Name == TargetNode.Name &&
            HasAttributest == TargetNode.HasAttributest &&
            HasChildElementNode == TargetNode.HasChildElementNode &&
            HasShortName == TargetNode.HasShortName &&
            HasSiblingElementNode == TargetNode.HasSiblingElementNode &&
            HasValue == TargetNode.HasValue &&
            SiblingElementNodeNumber == TargetNode.SiblingElementNodeNumber &&
            AttributeNumber == TargetNode.AttributeNumber &&
            ChildElementNodeNumber == TargetNode.ChildElementNodeNumber &&
            Value == TargetNode.Value &&
            (CompareChildNodes(TargetNode.ChildElementNodes));
 }