// ---------------------------------------------------------------------------------------- /// <!-- _Copy --> /// <summary> /// /// </summary> /// <returns></returns> public RichXmlDoc _Copy() { RichXmlDoc rx = new RichXmlDoc(_doc.OuterXml); XmlNameTable nt = _doc.NameTable; rx._xmlns = new XmlNamespaceManager(nt); rx._xmlns.AddNamespace(string.Empty, "default.schema"); rx._xmlns.AddNamespace(_defaultRootTag, "default.schema"); return(rx); }
// ---------------------------------------------------------------------------------------- /// <!-- RichXmlDoc_Namespace_test --> /// <summary> /// /// </summary> private void RichXmlDoc_Namespace_test() { Assert.ThingsAbout("RichXml", "world"); RichXmlDoc xdoc = new RichXmlDoc(); xdoc.LoadXml("<richxml:CHNwCommon xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:richxml=\"http://microsoft.com/HealthCare/HL7/2X\">" + "<EVN_EventType xmlns=\"\"><EVN_1_EventTypeCode>A08</EVN_1_EventTypeCode><EVN_2_DateTimeOfEvent>2008-11-07T15:09:33.0000000-05:00</EVN_2_DateTimeOfEvent><EVN_3_DateTimePlannedEvent xsi:nil=\"true\" /><EVN_4_EventReasonCode /><EVN_5_OperatorId>CHNwCommon</EVN_5_OperatorId><EVN_CHNw_MasterID>HNE1828095846</EVN_CHNw_MasterID><EVN_CHNw_MRN>01127821</EVN_CHNw_MRN><EVN_CHNw_VisitNumber>0830901493</EVN_CHNw_VisitNumber></EVN_EventType>" + "</richxml:CHNwCommon>"); Assert.That(xdoc.NameSpace, Is.equal_to, "richxml"); _result += Assert.Conclusion; }