У меня проблема. Невозможно назвать XAttribute следующим образом: XAttribute ("xmlns", nss.NamespaceName)xmlns = "something" - должно быть в родительском узле
XNamespace ns = "urn: hl7-org: v3"; XNamespace nsVoc = "urn: hl7-org: v3/voc";
new XElement("ClinicalDocument",
new XAttribute(XNamespace.Xmlns + "xsi", xsiNs.NamespaceName),
new XAttribute("xmlns", nss.NamespaceName),
new XAttribute(XNamespace.Xmlns + "voc", nsVoc.NamespaceName),
new XAttribute(xsiNs + "schemaLocation", ns.NamespaceName + "../Schemas/cda/Schemas/CDA.xsd"),
new XElement("typeId",
new XAttribute("root", rootTypeId),
new XAttribute("extension", extensionTypeId)),
new XElement("templateId",
new XAttribute("root", rootTemplateId)),
new XElement("templateId",
new XAttribute("root", rootTemplatedId)),
. . .
я не закрыть этот родительский кивок здесь .. У меня есть 2000 строк betwean конца NOD
ПОСЛАНИЕ IS: Префикс «» не может быть переопределена из «» до «урны: HL7-ORG: v3» в пределах тот же самый тег начального элемента.