This project has moved and is read-only. For the latest updates, please go here.

XPath usage to construct a string

Mar 23, 2015 at 2:12 PM
I am trying to use XPath for constructing file name on Send side at Pre-Assemble stage.
I am using GetXPathResult from HelperMetaInstructions BRE library.

Xpath looks like this /[local-name()='ICustomers']/@[local-name()='Id']

but it's returning no value in Pipeline.. any ideas? (i am using execute policy)
Mar 24, 2015 at 1:31 AM
Hi Secrets,

Can you provide the example XML document please?


Mar 25, 2015 at 3:27 PM
Edited Mar 25, 2015 at 3:27 PM
<?xml version="1.0"?>
<Customers xmlns:xsd="" xmlns:xsi="" Id="be39e39a-89d4-41e7-b3ac-0df5feaabebc" LoadType="Full" GeneratedOn="2015-03-16T12:50:37.7365133+02:00" OwnerCountry="NP" xmlns="http://internal.Country.Customer/v2">
<Customer xmlns="">
<Name>CGI Suomi Oy</Name>
<Name2 />
<BusinessPhone />
<SalesManager Type="Email">
<Fax />
<Email />
<ParentCustomer />
  <Name1>CGI Suomi Oy</Name1>
  <Name2 />
  <Street1>Valimotie 15a</Street1>
  <Street2 />
  <Region />
  <PoBox />
  <PoBoxPostalCode />
  <Name1>Logica Suomi Oy</Name1>
  <Name2 />
  <Street1>PL 64</Street1>
  <Street2 />
  <Region />
  <Attention />
  <PoBox>PL 64</PoBox>
Apr 21, 2015 at 5:03 AM
Hi Secrets,

Sorry for the delay. It looks like this is a know issue #1841 -

Seems the problem is in the XPathReader class that I use under the hood (or in the way I've used it). Sorry but I won't get a chance to investigate further until May, but will try to look into this then. Until then you would have to use Regex or similar to get the value you're after.