The following xpath xpression works fine using the following without header information.
//Shipment/DataContext/DataSourceCollection/DataSource[Type='ForwardingShipment']/Key
XML
<Shipment>
<DataContext>
<DataSourceCollection>
<DataSource>
<Type>ForwardingConsol</Type>
<Key>C20-001000E</Key>
</DataSource>
<DataSource>
<Type>ForwardingShipment</Type>
<Key>S20-001001E</Key>
</DataSource>
</DataSourceCollection>
</DataContext>
</Shipment>
However when the used on the following including the full XML file with header information it does not.
<UniversalInterchange xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Header>
<SenderID>PF0YYTTRN</SenderID>
<RecipientID>test</RecipientID>
</Header>
<Body>
<UniversalShipment xmlns="http://www.cargowise.com/Schemas/Universal/2011/11" version="1.1">
<Shipment>
<DataContext>
<DataSourceCollection>
<DataSource>
<Type>ForwardingConsol</Type>
<Key>C20-001000E</Key>
</DataSource>
<DataSource>
<Type>ForwardingShipment</Type>
<Key>S20-001001E</Key>
</DataSource>
</DataSourceCollection>
</DataContext>
</Shipment>
</UniversalShipment>
</Body>
</UniversalInterchange>
Looking for suggestions.
Thanks in advacne.