Example #1
0
        public void ReadsFromNav()
        {
            var tpXml = File.ReadAllText(@"TestData\fp-test-patient.xml");
            var nav   = XmlDomFhirNavigator.Create(tpXml);
            var nodes = ElementNode.FromNavigator(nav);
            var nav2  = nodes.ToNavigator();

            Assert.True(nav.IsEqualTo(nav2).Success);
        }
Example #2
0
        public static void Apply(this ElementNode parent, IElementNavigator nav, string name = null)
        {
            var n = ElementNode.FromNavigator(nav);

            if (name != null)
            {
                n.Name = name;
            }
            parent.Add(n);
        }