I have a XML file that has the following data,
<extcode Type="abc" Code="12345" />
I want to be able to extract the Code, i.e., 12345, for rows where Type is abc. I tried
XPathSelectElements("Type[@name='abc']")
but it returned nothing.
Thanks.
Edit I figured out that the problem is with namespace. The XML file is like aw:extcode instead of just extcode and that caused the query to not work properly. How should I do it in the presence of namespace? When I tried to use
XmlNameTable nameTable = doc.NameTable;
compiler complains that it can't resolve NameTable.