I'm using VS2010, C#, .net, and xmlWriter to create xml documents to HL7 CAT-1 specification. There is an attribute, 'sdtc:ValueSet' that must be created in the document. I am unable to write this attribute name, due to invalid character ":".
Here is the actual line of code:
writer.WriteAttributeString("sdtc:valueSet", "OID value");
Does anyone have a solution for creating the attribute, as shown?
Continuing to research, but decided to post this question in hopes of quickly finding a solution.
This question was flagged as a duplicate, incorrectly I am arguing. Existing responses referenced writing an element, or using LINQ. The problem explicitly states Attribute, using xmlWriter. One responder suggested using an overloaded WriteAttributeString method, which solved the problem.