I have the following XML
<?xml version="1.0"?>
<FileHeader
xmlns="urn:schemas-ncr-com:ECPIX:CXF:FileStructure:020001"
VersionNumber="020001"
TestFileIndicator="P"
CreationDate="13012009"
CreationTime="172852"
FileID="0000000001"
>
<Item
ItemSeqNo="09011340010009"
PayorBankRoutNo="00704524"
Amount="398000"
AccountNo="000003850010205"
SerialNo="000512"
TransCode="03"
PresentingBankRoutNo="00400019"
PresentmentDate="13012009"
CycleNo="01"
NumOfImageViews="2"
ClearingType="01"
DocType="D"
CurrencyInd="LYD"
IQAIgnoreInd="0"
CashValueInd="1"
TruncatingRTNo="00405117"
SpecialHandling="00"
RepresentmentCnt="0"
MICRRepairFlags="000000"
>
<AddendA
BOFDRoutNo="00400019"
BOFDBusDate="13012009"
DepositorAcct="0000534983"
/>
<ImageViewDetail ...
And I need to reach the element "ImageViewDetail" using Select(xpath_expression) method of XmlDocument .NET class.
The following code is not working
xmlDocument.Select("//Item/AddendA/ImageViewDetail");
unless I remove
xmlns="urn:schemas-ncr-com:ECPIX:CXF:FileStructure:020001"
from "FileHeader" tag
What is the correct way to deal with namespace here?
Thank you,