コード例 #1
0
        public xmlElem(XElement source, xmlElem parent)
        {
            elementName = source.Name.ToString();
            Parent      = parent;
            pElements   = new List <xmlElem>();
            pAttributes = new List <xmlAttrib>();
            if (source.HasElements == false)
            {
                elementValue = source.Value;
            }
            else
            {
                elementValue = "";
            }

            foreach (XElement child in source.Elements())
            {
                this.pElements.Add(new xmlElem(child, this));
            }

            foreach (XAttribute item in source.Attributes())
            {
                this.pAttributes.Add(new xmlAttrib(item));
            }
        }
コード例 #2
0
 public bool replaceChildByAttrValue(String attrName, String attrValue, xmlElem replacingNode)
 {
     for (int i = 0; i < pElements.Count; i++)
     {
         xmlAttrib childAttr = pElements[i].pAttributes.Find(
             delegate(xmlAttrib attr)
         {
             return(attr.Name == attrName);
         });
         try
         {
             if (childAttr.Value == attrValue)
             {
                 this.pElements[i] = new xmlElem(replacingNode);
                 //this.Remove(pElements[i]);
                 //this.Add(replacingNode);
                 OnPropertyChanged("xmlElements");
                 OnPropertyChanged("childRearingElements");
                 OnPropertyChanged("dummyElements");
                 OnPropertyChanged("lonelyElements");
                 OnPropertyChanged("AttributeElements");
                 return(true);
             }
         }
         catch
         {
             continue;
         }
     }
     return(false);
 }
コード例 #3
0
 public xmlElem()
 {
     elementName  = "";
     elementValue = "";
     Parent       = null;
     pElements    = new List <xmlElem>();
     pAttributes  = new List <xmlAttrib>();
 }
コード例 #4
0
 public xmlElem(String n, String v)
 {
     elementName  = n;
     elementValue = v;
     Parent       = null;
     pElements    = new List <xmlElem>();
     pAttributes  = new List <xmlAttrib>();
 }
コード例 #5
0
 public xmlElem(ref xmlElem parent)
 {
     elementName  = "";
     elementValue = "";
     Parent       = parent;
     pElements    = new List <xmlElem>();
     pAttributes  = new List <xmlAttrib>();
 }
コード例 #6
0
 public xmlElem(String n, String v, ref xmlElem parent)
 {
     elementName  = n;
     elementValue = v;
     Parent       = parent;
     pElements    = new List <xmlElem>();
     pAttributes  = new List <xmlAttrib>();
 }
コード例 #7
0
        public xmlElem Element(String elemName)
        {
            xmlElem childAttr = pElements.Find(
                delegate(xmlElem elem)
            {
                return(elem.Name == elemName);
            });

            return(childAttr);
        }
コード例 #8
0
        /* ************************************************************************************************************************
         *************************************************************************************************************************/
        //protected void editData(xmlElem data, int[] selectedIndeces)
        //{
        //    //List<xmlElem> temp= new List<xmlElem>(dataContainer.xmlElements);

        //    if (selectedIndeces.Length == 1)
        //    {
        //        foreach (int index in selectedIndeces)
        //        {
        //            //XAttribute childAttribute = temp[index].Attribute("Name");
        //            oldDataSource.replaceChildByAttrValue("Name", oldDataSource.xmlElements[index].Attribute("Name").Value, data);


        //        }
        //    }
        //    OnPropertyChanged("dataContainer");
        //}

        protected void editData(xmlElem data, int[] selectedIndeces, int fileDataSelector)
        {
            //List<xmlElem> temp= new List<xmlElem>(dataContainer.xmlElements);

            if (selectedIndeces.Length == 1)
            {
                foreach (int index in selectedIndeces)
                {
                    //XAttribute childAttribute = temp[index].Attribute("Name");
                    dataContainerList[fileDataSelector].replaceChildByAttrValue("Name", dataContainerList[fileDataSelector].xmlElements[index].Attribute("Name").Value, data);
                }
            }
            //OnPropertyChanged("dataContainer");
        }
コード例 #9
0
        /* ************************************************************************************************************************
         *************************************************************************************************************************/
        protected void openFile(out CollectionView guiCollectionView, out String shortFileName)
        {
            String fileDirectory;

            guiCollectionView = null;
            ObservableCollection <FileHandler> fileListHolder = filesOpen;

            //if (useNewVersion == false)
            //{
            //    if (openFileChooser(out shortFileName, out fileDirectory) == true)
            //    {
            //        currentFile = new FileHandler(fileDirectory, shortFileName);

            //        setOrGetSetting(EditorSettings.lastDirectoryOpened, ref fileDirectory, true);

            //        setOrGetSetting(EditorSettings.lastFileOpened, ref shortFileName, true);

            //        oldDataSource = new xmlElem(currentFile.open());

            //        oldDataView = (CollectionView)CollectionViewSource.GetDefaultView(oldDataContainer.xmlElements);
            //    }
            //    return;
            //}

            if (openFileChooser(out shortFileName, out fileDirectory) == true)
            {
                FileHandler tempFileHandler = new FileHandler(fileDirectory, shortFileName);

                setOrGetSetting(EditorSettings.lastDirectoryOpened, ref fileDirectory, true);

                //setOrGetSetting(EditorSettings.lastFileOpened, ref shortFileName, true);

                xmlElem tempDataElement = new xmlElem(tempFileHandler.open());

                //dataContainerView = (CollectionView)CollectionViewSource.GetDefaultView(dataContainer.xmlElements);
                filesOpen.Clear();
                filesOpen.Add(tempFileHandler);
                dataContainerList.Clear();
                dataContainerList.Add(tempDataElement);

                bindFunction(out guiCollectionView, 0);

                return;
            }
            filesOpen = fileListHolder;
        }
コード例 #10
0
        /* ************************************************************************************************************************
         * if there is a single item selected, it returns that items data,
         * if there are multiple items, returns an empty item that mimics the structure of the items
         *************************************************************************************************************************/
        //protected void selectData(int[] indices, ref xmlElem itemContainer)
        //{
        //    if (indices.Length == 0)
        //    {
        //        return;
        //    }
        //    else if (indices.Length == 1)
        //    {
        //        itemContainer = oldDataSource.xmlElements[indices[0]];
        //    }
        //    else
        //    {
        //        itemContainer = createItem(oldDataSource.xmlElements[indices[0]]);
        //    }
        //}

        protected void selectData(int[] indices, ref xmlElem itemContainer, int fileDataSelector)
        {
            if (indices.Length == 0)
            {
                return;
            }
            else if (indices.Length == 1)
            {
                itemContainer = dataContainerList[fileDataSelector].xmlElements[indices[0]];
                //itemContainer = oldDataSource.xmlElements[indices[0]];
            }
            else
            {
                itemContainer = createItem(dataContainerList[fileDataSelector].xmlElements[indices[0]]);
                //itemContainer = createItem(oldDataSource.xmlElements[indices[0]]);
            }
        }
コード例 #11
0
        //list of indeces for all select items in Listbox
        //private int[] listBoxSelectedItems
        //{
        //    get
        //    {
        //        try
        //        {
        //            int[] someArray = new int[windowListbox.SelectedItems.Count];
        //            for (int i = 0; i < windowListbox.SelectedItems.Count; i++)
        //            {
        //                someArray[i] = windowListbox.Items.IndexOf(windowListbox.SelectedItems[i]);
        //            }
        //            return someArray;
        //        }
        //        catch
        //        {
        //            return null;
        //        }
        //    }
        //}


        /* ************************************************************************************************************************
         *************************************************************************************************************************/
        public MainWindow(controllerDelegateContainer editorFunctions, controllerDataDelegateContainer editorDataFunctions, controllerMiscDelegateContainer editorMiscFunctions)
        {
            InitializeComponent();

            if (editorFunctions == null)
            {
                throw new NullReferenceException("MainWindow Constructor cannot have a null references to editorFunctions, editorDataFunctions, or editorMiscFunctions");
            }
            editorFunctions.retrieveDelegates(out contErrorDisplayer, out contProgramCloser);
            editorDataFunctions.retrieveDelegates(out contDataGetter, out contItemAdder, out contItemEditor);
            editorMiscFunctions.retrieveDelegates(out contFileOpener, out contNewFileOpener, out contSettingHandler, out contFileSaver, out contGetFolderContents);

            //windowListbox.ItemsSource = dataView;

            dataSourceContainer   = new List <CollectionView>();
            itemEditorDataElement = new xmlElem();
        }
コード例 #12
0
        protected void openAnotherFile(out CollectionView guiCollectionView, String fileName)
        {
            FileHandler tempFileHandler = new FileHandler(workingDirectory.path, fileName);
            xmlElem     tempDataElement = new xmlElem(tempFileHandler.open());

            try
            {
                guiCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(tempDataElement.xmlElements);
            }
            catch
            {
                showErrorMessage("Could not bind to xml");
                guiCollectionView = null;
            }

            filesOpen.Add(tempFileHandler);
            dataContainerList.Add(tempDataElement);
        }
コード例 #13
0
        public xmlElem(xmlElem source, xmlElem parent)
        {
            elementName  = source.elementName;
            elementValue = source.elementValue;
            Parent       = parent;
            pElements    = new List <xmlElem>();
            pAttributes  = new List <xmlAttrib>();

            foreach (xmlElem child in source.pElements)
            {
                this.pElements.Add(new xmlElem(child, this));
            }

            foreach (xmlAttrib item in source.pAttributes)
            {
                this.pAttributes.Add(new xmlAttrib(item));
            }
        }
コード例 #14
0
        public xmlElem(xmlElem source)
        {
            elementName  = source.elementName;
            elementValue = source.elementValue;
            Parent       = null;
            pElements    = new List <xmlElem>();
            pAttributes  = new List <xmlAttrib>();

            //foreach (xmlElem child in source.pElements)
            //{
            //    this.pElements.Add(new xmlElem(child));

            //}
            this.AddElements(source.pElements);

            foreach (xmlAttrib item in source.pAttributes)
            {
                this.pAttributes.Add(new xmlAttrib(item));
            }
        }
コード例 #15
0
        protected xmlElem recuresiveElementCloner(xmlElem source)
        {
            xmlElem   temp = new xmlElem(source.Name.ToString(), "");
            xmlAttrib tempAttr;

            temp.Value = "";
            foreach (xmlAttrib attr in source.Attributes)
            {
                tempAttr       = temp.Attribute(attr.Name.ToString());
                tempAttr.Value = "";
            }
            foreach (xmlElem item in source.Elements)
            {
                try
                {
                    temp.AddElement(recuresiveElementCloner(item));
                }
                catch { }
            }
            return(temp);
        }
コード例 #16
0
        protected void openAnotherFile(out CollectionView guiCollectionView, int fileNameIndex)
        {
            //FileHandler tempFileHandler = new FileHandler(workingDirectory.path, filesOpen[fileNameIndex].fileName);
            String t1 = workingDirectory.path;
            String t2 = workingDirectory.contents[fileNameIndex].name;

            //FileHandler tempFileHandler = new FileHandler(workingDirectory.path, workingDirectory.contents[fileNameIndex].name);
            FileHandler tempFileHandler = new FileHandler(t1, t2);
            xmlElem     tempDataElement = new xmlElem(tempFileHandler.open());

            try
            {
                guiCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(tempDataElement.xmlElements);
            }
            catch
            {
                showErrorMessage("Could not bind to xml");
                guiCollectionView = null;
            }

            filesOpen.Add(tempFileHandler);
            dataContainerList.Add(tempDataElement);
        }
コード例 #17
0
 public xmlElem(String n, String v, ref xmlElem parent)
 {
     elementName = n;
     elementValue = v;
     Parent = parent;
     pElements = new List<xmlElem>();
     pAttributes = new List<xmlAttrib>();
 }
コード例 #18
0
        public xmlElem(xmlElem source)
        {
            elementName = source.elementName;
            elementValue = source.elementValue;
            Parent = null;
            pElements = new List<xmlElem>();
            pAttributes = new List<xmlAttrib>();

            //foreach (xmlElem child in source.pElements)
            //{
            //    this.pElements.Add(new xmlElem(child));

            //}
            this.AddElements(source.pElements);

            foreach (xmlAttrib item in source.pAttributes)
            {
                this.pAttributes.Add(new xmlAttrib(item));
            }
        }
コード例 #19
0
 public xmlElem(ref xmlElem parent)
 {
     elementName = "";
     elementValue = "";
     Parent = parent;
     pElements = new List<xmlElem>();
     pAttributes = new List<xmlAttrib>();
 }
コード例 #20
0
 public xmlElem(String n, String v)
 {
     elementName = n;
     elementValue = v;
     Parent = null;
     pElements = new List<xmlElem>();
     pAttributes = new List<xmlAttrib>();
 }
コード例 #21
0
        protected void openAnotherFile(out CollectionView guiCollectionView, String fileName)
        {
            FileHandler tempFileHandler = new FileHandler(workingDirectory.path, fileName);
            xmlElem tempDataElement = new xmlElem(tempFileHandler.open());

            try
            {
                guiCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(tempDataElement.xmlElements);
            }
            catch
            {
                showErrorMessage("Could not bind to xml");
                guiCollectionView = null;
            }

            filesOpen.Add(tempFileHandler);
            dataContainerList.Add(tempDataElement);
        }
コード例 #22
0
 public xmlElem()
 {
     elementName = "";
     elementValue = "";
     Parent = null;
     pElements = new List<xmlElem>();
     pAttributes = new List<xmlAttrib>();
 }
コード例 #23
0
        protected void openAnotherFile(out CollectionView guiCollectionView, int fileNameIndex)
        {
            //FileHandler tempFileHandler = new FileHandler(workingDirectory.path, filesOpen[fileNameIndex].fileName);
            String t1 = workingDirectory.path;
            String t2 = workingDirectory.contents[fileNameIndex].name;

            //FileHandler tempFileHandler = new FileHandler(workingDirectory.path, workingDirectory.contents[fileNameIndex].name);
            FileHandler tempFileHandler = new FileHandler(t1, t2);
            xmlElem tempDataElement = new xmlElem(tempFileHandler.open());

            try
            {
                guiCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(tempDataElement.xmlElements);
            }
            catch
            {
                showErrorMessage("Could not bind to xml");
                guiCollectionView = null;
            }

            filesOpen.Add(tempFileHandler);
            dataContainerList.Add(tempDataElement);
        }
コード例 #24
0
        /* ************************************************************************************************************************
         * a wrapper function for the Xcontainer Add() method that gets passed to other classes through a delegate
         *************************************************************************************************************************/
        //protected void addData(xmlElem source)
        //{
        //    oldDataSource.AddElement(source);
        //    //OnPropertyChanged("dataContainer");
        //}

        protected void addData(xmlElem source, int fileDataSelector)
        {
            dataContainerList[fileDataSelector].AddElement(source);
        }
コード例 #25
0
        public xmlElem(xmlElem source, xmlElem parent)
        {
            elementName = source.elementName;
            elementValue = source.elementValue;
            Parent = parent;
            pElements = new List<xmlElem>();
            pAttributes = new List<xmlAttrib>();

            foreach (xmlElem child in source.pElements)
            {
                this.pElements.Add(new xmlElem(child, this));
            }

            foreach (xmlAttrib item in source.pAttributes)
            {
                this.pAttributes.Add(new xmlAttrib(item));
            }
        }
コード例 #26
0
 public void AddElement(xmlElem child)
 {
     child.Parent= this.Parent;
     pElements.Add(new xmlElem(child));
 }
コード例 #27
0
        /* ************************************************************************************************************************
         *************************************************************************************************************************/
        protected void openFile(out CollectionView guiCollectionView, out String shortFileName)
        {
            String fileDirectory;
            guiCollectionView = null;
            ObservableCollection<FileHandler> fileListHolder = filesOpen;
            //if (useNewVersion == false)
            //{
            //    if (openFileChooser(out shortFileName, out fileDirectory) == true)
            //    {
            //        currentFile = new FileHandler(fileDirectory, shortFileName);

            //        setOrGetSetting(EditorSettings.lastDirectoryOpened, ref fileDirectory, true);

            //        setOrGetSetting(EditorSettings.lastFileOpened, ref shortFileName, true);

            //        oldDataSource = new xmlElem(currentFile.open());

            //        oldDataView = (CollectionView)CollectionViewSource.GetDefaultView(oldDataContainer.xmlElements);
            //    }
            //    return;
            //}

            if (openFileChooser(out shortFileName, out fileDirectory) == true)
            {
                FileHandler tempFileHandler = new FileHandler(fileDirectory, shortFileName);

                setOrGetSetting(EditorSettings.lastDirectoryOpened, ref fileDirectory, true);

                //setOrGetSetting(EditorSettings.lastFileOpened, ref shortFileName, true);

                xmlElem tempDataElement = new xmlElem(tempFileHandler.open());

                //dataContainerView = (CollectionView)CollectionViewSource.GetDefaultView(dataContainer.xmlElements);
                filesOpen.Clear();
                filesOpen.Add(tempFileHandler);
                dataContainerList.Clear();
                dataContainerList.Add(tempDataElement);

                bindFunction(out guiCollectionView, 0);

                return;
            }
            filesOpen = fileListHolder;
        }
コード例 #28
0
 public void setFileContent(xmlElem content)
 {
     xmlFile.root = content;
 }
コード例 #29
0
 /* ************************************************************************************************************************
  * temporary functions for cloning the structure of an xmlElement, but wiping the data
  * once functions works well, move to xml classes
  *************************************************************************************************************************/
 protected xmlElem createItem(xmlElem cloneable)
 {
     return recuresiveElementCloner(cloneable);
 }
コード例 #30
0
 /* ************************************************************************************************************************
  * if there is a single item selected, it returns that items data,
  * if there are multiple items, returns an empty item that mimics the structure of the items
  *************************************************************************************************************************/
 //protected void selectData(int[] indices, ref xmlElem itemContainer)
 //{
 //    if (indices.Length == 0)
 //    {
 //        return;
 //    }
 //    else if (indices.Length == 1)
 //    {
 //        itemContainer = oldDataSource.xmlElements[indices[0]];
 //    }
 //    else
 //    {
 //        itemContainer = createItem(oldDataSource.xmlElements[indices[0]]);
 //    }
 //}
 protected void selectData(int[] indices, ref xmlElem itemContainer, int fileDataSelector)
 {
     if (indices.Length == 0)
     {
         return;
     }
     else if (indices.Length == 1)
     {
         itemContainer = dataContainerList[fileDataSelector].xmlElements[indices[0]];
         //itemContainer = oldDataSource.xmlElements[indices[0]];
     }
     else
     {
         itemContainer = createItem(dataContainerList[fileDataSelector].xmlElements[indices[0]]);
         //itemContainer = createItem(oldDataSource.xmlElements[indices[0]]);
     }
 }
コード例 #31
0
 protected xmlElem recuresiveElementCloner(xmlElem source)
 {
     xmlElem temp = new xmlElem(source.Name.ToString(), "");
     xmlAttrib tempAttr;
     temp.Value = "";
     foreach (xmlAttrib attr in source.Attributes)
     {
         tempAttr = temp.Attribute(attr.Name.ToString());
         tempAttr.Value = "";
     }
     foreach (xmlElem item in source.Elements)
     {
         try
         {
             temp.AddElement(recuresiveElementCloner(item));
         }
         catch { }
     }
     return temp;
 }
コード例 #32
0
        public xmlElem(XElement source, xmlElem parent)
        {
            elementName = source.Name.ToString();
            Parent = parent;
            pElements = new List<xmlElem>();
            pAttributes = new List<xmlAttrib>();
            if (source.HasElements == false)
            {
                elementValue = source.Value;
            }
            else
            {
                elementValue = "";
            }

            foreach (XElement child in source.Elements())
            {
                this.pElements.Add(new xmlElem(child, this));
            }

            foreach (XAttribute item in source.Attributes())
            {
                this.pAttributes.Add(new xmlAttrib(item));
            }
        }
コード例 #33
0
        public xmlDoc()
        {
            xmlDeclaration = new XDeclaration("1.0", "utf-8", "yes");

            rootElem = new xmlElem();
        }
コード例 #34
0
        //list of indeces for all select items in Listbox
        //private int[] listBoxSelectedItems
        //{
        //    get
        //    {
        //        try
        //        {
        //            int[] someArray = new int[windowListbox.SelectedItems.Count];
        //            for (int i = 0; i < windowListbox.SelectedItems.Count; i++)
        //            {
        //                someArray[i] = windowListbox.Items.IndexOf(windowListbox.SelectedItems[i]);
        //            }
        //            return someArray;
        //        }
        //        catch
        //        {
        //            return null;
        //        }
        //    }
        //}
        /* ************************************************************************************************************************
         *************************************************************************************************************************/
        public MainWindow(controllerDelegateContainer editorFunctions, controllerDataDelegateContainer editorDataFunctions, controllerMiscDelegateContainer editorMiscFunctions)
        {
            InitializeComponent();

            if (editorFunctions == null)
            {
                throw new NullReferenceException("MainWindow Constructor cannot have a null references to editorFunctions, editorDataFunctions, or editorMiscFunctions");
            }
            editorFunctions.retrieveDelegates(out contErrorDisplayer, out contProgramCloser);
            editorDataFunctions.retrieveDelegates(out contDataGetter, out contItemAdder, out contItemEditor);
            editorMiscFunctions.retrieveDelegates(out contFileOpener, out contNewFileOpener, out contSettingHandler, out contFileSaver, out contGetFolderContents);

            //windowListbox.ItemsSource = dataView;

            dataSourceContainer = new List<CollectionView>();
            itemEditorDataElement = new xmlElem();
        }
コード例 #35
0
        public xmlDoc(xmlDoc source)
        {
            xmlDeclaration = new XDeclaration(source.xmlDeclaration);

            rootElem = new xmlElem(source.root);
        }
コード例 #36
0
 /* ************************************************************************************************************************
  * temporary functions for cloning the structure of an xmlElement, but wiping the data
  * once functions works well, move to xml classes
  *************************************************************************************************************************/
 protected xmlElem createItem(xmlElem cloneable)
 {
     return(recuresiveElementCloner(cloneable));
 }
コード例 #37
0
 /* ************************************************************************************************************************
  * a wrapper function for the Xcontainer Add() method that gets passed to other classes through a delegate
  *************************************************************************************************************************/
 //protected void addData(xmlElem source)
 //{
 //    oldDataSource.AddElement(source);
 //    //OnPropertyChanged("dataContainer");
 //}
 protected void addData(xmlElem source, int fileDataSelector)
 {
     dataContainerList[fileDataSelector].AddElement(source);
 }
コード例 #38
0
        public xmlDoc(XDocument source)
        {
            xmlDeclaration = new XDeclaration(source.Declaration);

            rootElem = new xmlElem(source.Root);
        }
コード例 #39
0
        /* ************************************************************************************************************************
         *************************************************************************************************************************/
        //protected void editData(xmlElem data, int[] selectedIndeces)
        //{
        //    //List<xmlElem> temp= new List<xmlElem>(dataContainer.xmlElements);
        //    if (selectedIndeces.Length == 1)
        //    {
        //        foreach (int index in selectedIndeces)
        //        {
        //            //XAttribute childAttribute = temp[index].Attribute("Name");
        //            oldDataSource.replaceChildByAttrValue("Name", oldDataSource.xmlElements[index].Attribute("Name").Value, data);
        //        }
        //    }
        //    OnPropertyChanged("dataContainer");
        //}
        protected void editData(xmlElem data, int[] selectedIndeces, int fileDataSelector)
        {
            //List<xmlElem> temp= new List<xmlElem>(dataContainer.xmlElements);

            if (selectedIndeces.Length == 1)
            {
                foreach (int index in selectedIndeces)
                {
                    //XAttribute childAttribute = temp[index].Attribute("Name");
                    dataContainerList[fileDataSelector].replaceChildByAttrValue("Name", dataContainerList[fileDataSelector].xmlElements[index].Attribute("Name").Value, data);

                }
            }
            //OnPropertyChanged("dataContainer");
        }
コード例 #40
0
 public void Remove(xmlElem child)
 {
     pElements.Remove(child);
 }
コード例 #41
0
 public void Remove(xmlElem child)
 {
     pElements.Remove(child);
 }
コード例 #42
0
 public void AddElement(xmlElem child)
 {
     child.Parent = this.Parent;
     pElements.Add(new xmlElem(child));
 }
コード例 #43
0
 public bool replaceChildByAttrValue(String attrName, String attrValue, xmlElem replacingNode)
 {
     for (int i = 0; i < pElements.Count; i++)
     {
         xmlAttrib childAttr = pElements[i].pAttributes.Find(
             delegate(xmlAttrib attr)
             {
                 return (attr.Name == attrName);
             });
         try
         {
             if (childAttr.Value == attrValue)
             {
                 this.pElements[i] = new xmlElem(replacingNode);
                 //this.Remove(pElements[i]);
                 //this.Add(replacingNode);
                 OnPropertyChanged("xmlElements");
                 OnPropertyChanged("childRearingElements");
                 OnPropertyChanged("dummyElements");
                 OnPropertyChanged("lonelyElements");
                 OnPropertyChanged("AttributeElements");
                 return true;
             }
         }
         catch
         {
             continue;
         }
     }
     return false;
 }
コード例 #44
0
        public xmlDoc()
        {
            xmlDeclaration = new XDeclaration("1.0", "utf-8", "yes");

            rootElem = new xmlElem();
        }
コード例 #45
0
        public xmlDoc(XDeclaration dec)
        {
            xmlDeclaration = new XDeclaration(dec);

            rootElem = new xmlElem();
        }
コード例 #46
0
        public xmlDoc(XDeclaration dec)
        {
            xmlDeclaration = new XDeclaration(dec);

            rootElem = new xmlElem();
        }
コード例 #47
0
        public xmlDoc(xmlDoc source)
        {
            xmlDeclaration = new XDeclaration(source.xmlDeclaration);

            rootElem = new xmlElem(source.root);
        }
コード例 #48
0
        public xmlDoc(XDocument source)
        {
            xmlDeclaration = new XDeclaration(source.Declaration);

            rootElem = new xmlElem(source.Root);
        }
コード例 #49
0
 public void setFileContent(xmlElem content)
 {
     xmlFile.root = content;
 }