Hi all,
I have some XML:
<metadata>
<dataIdInfo>
<idCitation>
<resRefDate>
<refDate>1996</refDate>
<refDateTyp>
<DateTypCd value="007" />
</refDateTyp>
</resRefDate>
<resRefDate>
<refDate>1998</refDate>
<refDateTypCd>
<DateTypCd value="003" />
</refDateTypCd>
</resRefDate>
</idCitation>
</dataIdInfo>
</metadata>
I'm trying to get the 1996 value from the key 007 so far I have got this
XmlDocument doc = new xmlDocument();
doc.LoadXml(myXmlString);
XmlNode node = doc.SelectSingleNode("metadata/dataIdInfo/idCitation/resRefDate/refDate[refDateType/DateTypCd[@value=\"007\"]");
But I keep getting the error that the address has an invalid token. I've been reviewing the XPath example doc on msdn but obviously I have gone wrong in the square brackets part - help!
Thanks Rob