My question is how to set values to two attributes that have the same name but different namespaces.
Using C#, in an XML document, I need to assign two attributes to an element. It should look like
doc xmlns:xmi="uriaddress" element xsi:type="xsitype1" type="type1"
I tried
xElement.SetAttribute("type","uriaddress","xsitype1")
this works fine!
however, my surprise is that when I tried to set the second attribute, "type", by
xElement.SetAttribute("type","type1")
this works, but it also resets the attribute xmi:type to the same value as attribute "type", changing the element in an unintended way.
Now the element looks like
element xsi:type="type1" type="type1"
Any way to get around this?