public bool replaceChildByAttrValue(XName attrName, String attrValue, xmlElement replacingNode)
        {
            List <xmlElement> tempList = ElementList();

            for (int i = 0; i < tempList.Count; i++)
            {
                XAttribute childAttr = tempList[i].Attribute(attrName);
                try
                {
                    if (childAttr.Value == attrValue)
                    {
                        tempList[i].Remove();
                        this.Add(replacingNode);
                        OnPropertyChanged("xmlElements");
                        OnPropertyChanged("childRearingElements");
                        OnPropertyChanged("dummyElements");
                        OnPropertyChanged("lonelyElements");
                        OnPropertyChanged("AttributeElements");
                        return(true);
                    }
                }
                catch
                {
                    continue;
                }
            }
            return(false);
        }
        public bool replaceChildByAttrValue(XName attrName, String attrValue, xmlElement replacingNode)
        {
            List<xmlElement> tempList = ElementList();

            for (int i = 0; i < tempList.Count; i++)
            {
                XAttribute childAttr = tempList[i].Attribute(attrName);
                try
                {
                    if (childAttr.Value == attrValue)
                    {
                        tempList[i].Remove();
                        this.Add(replacingNode);
                        OnPropertyChanged("xmlElements");
                        OnPropertyChanged("childRearingElements");
                        OnPropertyChanged("dummyElements");
                        OnPropertyChanged("lonelyElements");
                        OnPropertyChanged("AttributeElements");
                        return true;
                    }
                }
                catch
                {
                    continue;
                }
            }
            return false;
        }