This one is confusing to me. I can do a foreach loop on node.ChildNodes and I can see that one node has the value of {Element, Name="DocId"}
but when i try to select
XmlNodeList tableCells = node.SelectNodes("./DocId")
or XmlNodeList tableCells = node.SelectNodes(".//DocId")
or XmlNodeList tableCells = node.SelectNodes("DocId")
it always returns null. I don't get it.
Here is the XML
<SOP LogId="5237" LastModified="2013-10-21T14:10:49" xmlns="com/">
<TargetInfo>
</TargetInfo>
<LawsuitInfo>
</LawsuitInfo>
<CaseType>Standard</CaseType>
<Remark />
<CourtInfo>
</CourtInfo>
<AttorneyInfo>
</AttorneyInfo>
<AgencyInfo>
</AgencyInfo>
<CaseInfo>
</CaseInfo>
<DocId>965F53E3C702</DocId>
<DocketHistory>
</DocketHistory>
</SOP>
real answer
XmlNode node = Detail(logId);
XmlDocument xDoc = node.OwnerDocument;
XmlNamespaceManager xmlnsm = new XmlNamespaceManager(xDoc.NameTable);
xmlnsm.AddNamespace("x", "http://usop.ctadvantage.com/");
XmlNodeList tableCells = node.SelectNodes("/x:DocId", xmlnsm);