D
digitor
Does anyone know how to do the following via c# managed code? I wish to
remove the attribute in the similar way in c# because I get the error:
'#PCDATA' is in nil content.
// Receive a reference to the element to be filled.
var objDataElement =
XDocument.DOM.selectSingleNode("/my:myFields/my:field1");
//Determine whether the xsi:nil attribute is set for this
//element. If so, remove the xsi:nil attributes so that
//the value can be set.
if (objDataElement.getAttribute("xsi:nil"))
objDataElement.removeAttribute("xsi:nil");
//Set the value of the element.
objDataElement.text = "10.0";
Microsoft have the following script example here:
http://support.microsoft.com/?id=826998
remove the attribute in the similar way in c# because I get the error:
'#PCDATA' is in nil content.
// Receive a reference to the element to be filled.
var objDataElement =
XDocument.DOM.selectSingleNode("/my:myFields/my:field1");
//Determine whether the xsi:nil attribute is set for this
//element. If so, remove the xsi:nil attributes so that
//the value can be set.
if (objDataElement.getAttribute("xsi:nil"))
objDataElement.removeAttribute("xsi:nil");
//Set the value of the element.
objDataElement.text = "10.0";
Microsoft have the following script example here:
http://support.microsoft.com/?id=826998