예제 #1
0
        public xmlElem open()
        {
            try
            {
                //load xml file as a single element representing the root node
                XDocument temp = new XDocument(XDocument.Load(pFilePath));

                xmlFile = new xmlDoc(temp);

                return(new xmlElem(xmlFile.root));
            }
            catch
            {
                return(null);
            }
        }
예제 #2
0
        public xmlDoc(xmlDoc source)
        {
            xmlDeclaration = new XDeclaration(source.xmlDeclaration);

            rootElem = new xmlElem(source.root);
        }
예제 #3
0
        public xmlDoc(xmlDoc source)
        {
            xmlDeclaration = new XDeclaration(source.xmlDeclaration);

            rootElem = new xmlElem(source.root);
        }
예제 #4
0
        //public void save(XElement data)
        //{
        //    String temp = handledDirectory + handledFileName;

        //    if (File.Exists(pFilePath))
        //    {
        //        data.Save(pFilePath);
        //    }
        //}

        static public void save(xmlDoc data, String filePath)
        {
            File.WriteAllText(filePath, data.ToString(), System.Text.Encoding.UTF8);
        }
예제 #5
0
        public xmlElem open()
        {
            try
            {
                //load xml file as a single element representing the root node
                XDocument temp = new XDocument(XDocument.Load(pFilePath));

                xmlFile = new xmlDoc(temp);

                return new xmlElem(xmlFile.root);
            }
            catch
            {
                return null;
            }
        }
예제 #6
0
 //public void save(XElement data)
 //{
 //    String temp = handledDirectory + handledFileName;
 //    if (File.Exists(pFilePath))
 //    {
 //        data.Save(pFilePath);
 //    }
 //}
 public static void save(xmlDoc data, String filePath)
 {
     File.WriteAllText(filePath, data.ToString(), System.Text.Encoding.UTF8);
 }