Esempio n. 1
0
        public static Feed.Entry LoadXMLResource(string filename)
        {
            XmlDocument document = new XmlDocument();

            document.Load(filename);

            XPathNavigator      navigator;
            XmlNamespaceManager manager;

            Feed.Entry entry = new Feed.Entry();
            entry.Title = filename;
            entry.Id    = "unknown";

            navigator = document.CreateNavigator();
            manager   = new XmlNamespaceManager(navigator.NameTable);
            manager.AddNamespace("f", "http://hl7.org/fhir");
            entry.ResourceNode = navigator.SelectSingleNode("*");

            /*
             * XmlDocument document = new XmlDocument();
             * document.Load(filename);
             * return new Feed(document);
             */
            return(entry);
        }
Esempio n. 2
0
        public static Feed.Entry LoadXMLResource(string filename)
        {
            XmlDocument document = new XmlDocument();
            document.Load(filename);
            
            XPathNavigator navigator;
            XmlNamespaceManager manager;

            Feed.Entry entry = new Feed.Entry();
            entry.Title = filename;
            entry.Id = "unknown";

            navigator = document.CreateNavigator();
            manager = new XmlNamespaceManager(navigator.NameTable);
            manager.AddNamespace("f", "http://hl7.org/fhir");
            entry.ResourceNode = navigator.SelectSingleNode("*");
            /*
            XmlDocument document = new XmlDocument();
            document.Load(filename);
            return new Feed(document);
            */
            return entry;
        }