<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: xpath substring expression in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552242#M679503</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chk tht blog. It sud give you an idea of how to build ur xpath query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Aug 2006 17:40:41 GMT</pubDate>
    <dc:creator>Shabarish_Nair</dc:creator>
    <dc:date>2006-08-16T17:40:41Z</dc:date>
    <item>
      <title>xpath substring expression</title>
      <link>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaq-p/1552239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get a substring from a xml document via xpath expression which has data. Can someone help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the data and what I want to do is via xpath expression return "20" only (1 thru 2nd position) of the BookingCode node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure how to substring via xpath expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 &amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt; 
 &amp;lt;ns0:BookingOrders xmlns:ns0="urn:prueba:abap_mapping"&amp;gt;
  &amp;lt;Order&amp;gt;
   &amp;lt;BookingCode&amp;gt;20Y34L&amp;lt;/BookingCode&amp;gt; 
   &amp;lt;Passenger&amp;gt;
    &amp;lt;Name&amp;gt;Smith&amp;lt;/Name&amp;gt; 
    &amp;lt;Address&amp;gt;123 Main St.&amp;lt;/Address&amp;gt; 
   &amp;lt;/Passenger&amp;gt;
   &amp;lt;Flight&amp;gt;
    &amp;lt;Date&amp;gt;04042004&amp;lt;/Date&amp;gt; 
    &amp;lt;AirlineID&amp;gt;SX&amp;lt;/AirlineID&amp;gt; 
    &amp;lt;FlightNumber&amp;gt;21&amp;lt;/FlightNumber&amp;gt; 
    &amp;lt;From&amp;gt;ZRH&amp;lt;/From&amp;gt; 
    &amp;lt;To&amp;gt;FRA&amp;lt;/To&amp;gt; 
   &amp;lt;/Flight&amp;gt;
  &amp;lt;/Order&amp;gt;
 &amp;lt;/ns0:BookingOrders&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This Xpath expression does not work&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;/p1:BookingOrders/Order/BookingCode[(substring(.,2)]&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the second operand = "20"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 15:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaq-p/1552239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T15:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: xpath substring expression</title>
      <link>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552240#M679501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Normal usage for XPath function is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;substring-before(&amp;lt;xpath&amp;gt;,arg1,arg2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So usage would be something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;substring-before("/p1:BookingOrders/Order/BookingCode","Y")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But question wherein context are you calling this fucntion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming its an XSL mapping.. then u wud call this within &amp;lt;xsl:value-of select="...&amp;gt; stmt.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 16:31:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552240#M679501</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T16:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: xpath substring expression</title>
      <link>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552241#M679502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this blog:&lt;/P&gt;&lt;P&gt;/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do your request similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 17:36:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552241#M679502</guid>
      <dc:creator>stefan_grube</dc:creator>
      <dc:date>2006-08-16T17:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: xpath substring expression</title>
      <link>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552242#M679503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chk tht blog. It sud give you an idea of how to build ur xpath query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 17:40:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552242#M679503</guid>
      <dc:creator>Shabarish_Nair</dc:creator>
      <dc:date>2006-08-16T17:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: xpath substring expression</title>
      <link>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552243#M679504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have missed on one closing bracket. Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/p1:BookingOrders/Order/BookingCode[(substring(.,2))]&lt;/P&gt;&lt;P&gt;/p1:BookingOrders/Order/BookingCode[substring(.,2)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijaya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2006 19:09:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552243#M679504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-16T19:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: xpath substring expression</title>
      <link>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552244#M679505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;substring(//Order/BookingCode,1,2)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Udo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2006 08:00:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xpath-substring-expression/qaa-p/1552244#M679505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-17T08:00:07Z</dc:date>
    </item>
  </channel>
</rss>

