I need to be able to define an attribute with a prefix in a xml element.
For instance...
>
Try creating the attribute directly and adding it to the element:
XmlAttribute attr = XmlDocToRef.CreateAttribute("s", "id", "http://niem.gov/niem/structures/2.0"); attr.InnerText = "ID_Person_01"; TempElement.Attributes.Append(attr);