You haven't shown us where you initialize the
strCourtORI
variable. But looking at your data, the most likely problem is that you're missing quotes around the value:
objXmlEnumerationValueNode = objXmlSimpleTypeDoc.SelectSingleNode("/SimpleTypeCompanion/EnumerationValue[@code='" + strCourtORI + "']")
Also note that you were trying to select the attribute itself, rather than the
EnumerationValue
node.