One XPath expression that selects the wanted element is:
/b:ViewItem
/b:Fields
/c:KeyValueOfstringanyType
[c:Key = 'ID']
/c:Value
Do note that the provided XML document has namespaces and any XPath expression that contains unprefixed element names is not going to select the wanted element, with the exception of expressions of the following form:
/*[local-name() = 'ViewItem']
/*[local-name() = 'Fields']
/*[local-name() = 'KeyValueOfstringanyType']
[*[local-name() = 'Key'] = 'ID']
/*[local-name() = 'Value']
Also, for the first XPath expression above, the namespaces prefixed by "b:"
and "c:"
must be "registered" (read the documentation of your XPath engine how to do that).
XSLT - based verification:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:b="some:b" xmlns:c="some:c">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:copy-of select=
"/b:ViewItem
/b:Fields
/c:KeyValueOfstringanyType
[c:Key = 'ID']
/c:Value
"/>
==============
<xsl:copy-of select=
"/*[local-name() = 'ViewItem']
/*[local-name() = 'Fields']
/*[local-name() = 'KeyValueOfstringanyType']
[*[local-name() = 'Key'] = 'ID']
/*[local-name() = 'Value']
"/>
</xsl:template>
</xsl:stylesheet>
when this XSLT transformation is applied on the following XML document (the provided one, corrected for severe malformedness):
<b:ViewItem xmlns:b="some:b" xmlns:c="some:c">
<b:Fields>
<c:KeyValueOfstringanyType>
<c:Key>ID</c:Key>
<c:Value>1900310 </c:Value>
</c:KeyValueOfstringanyType>
<c:KeyValueOfstringanyType>
<c:Key>SubType</c:Key>
<c:Value>U003_O100_00IT_609644</c:Value>
</c:KeyValueOfstringanyType>
<c:KeyValueOfstringanyType>
<c:Key>SectionType</c:Key>
<c:Value>Released</c:Value>
</c:KeyValueOfstringanyType>
</b:Fields>
</b:ViewItem>
The two XPath expressions are evaluated and the nodes they select are output:
<c:Value xmlns:c="some:c" xmlns:b="some:b">1900310 </c:Value>
==============
<c:Value xmlns:c="some:c" xmlns:b="some:b">1900310 </c:Value>