<?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>topic Problems using if_ixml_document-&amp;gt;find_from_path_ns in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-if-ixml-document-gt-find-from-path-ns/m-p/1325544#M166847</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to use this method to get to the right xml node. However this does not seem to be working. Does anybody know what I am doing wrong here. Any help is highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD document-&amp;gt;find_from_path_ns&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    default_uri = 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'&lt;/P&gt;&lt;P&gt;    path        = '/soap:Envelope/soap:Body/child::node()'&lt;/P&gt;&lt;P&gt;  receiving&lt;/P&gt;&lt;P&gt;    rval        = rval1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The xml document looks like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;&amp;lt;soap:Body&amp;gt;&amp;lt;GetStndAddressResponse xmlns="http://micron.com/AddrStnd/"&amp;gt;&amp;lt;GetStndAddressResult&amp;gt;&amp;lt;stdAddress&amp;gt;5811 N Cosworth Pl&amp;lt;/stdAddress&amp;gt;&amp;lt;stdZipCode&amp;gt;83713-1263&amp;lt;/stdZipCode&amp;gt;&amp;lt;stdState&amp;gt;ID&amp;lt;/stdState&amp;gt;&amp;lt;stdCity&amp;gt;Boise&amp;lt;/stdCity&amp;gt;&amp;lt;/GetStndAddressResult&amp;gt;&amp;lt;/GetStndAddressResponse&amp;gt;&amp;lt;/soap:Body&amp;gt;&amp;lt;/soap:Envelope&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 May 2006 00:04:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-18T00:04:04Z</dc:date>
    <item>
      <title>Problems using if_ixml_document-&gt;find_from_path_ns</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-if-ixml-document-gt-find-from-path-ns/m-p/1325544#M166847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to use this method to get to the right xml node. However this does not seem to be working. Does anybody know what I am doing wrong here. Any help is highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD document-&amp;gt;find_from_path_ns&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    default_uri = 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'&lt;/P&gt;&lt;P&gt;    path        = '/soap:Envelope/soap:Body/child::node()'&lt;/P&gt;&lt;P&gt;  receiving&lt;/P&gt;&lt;P&gt;    rval        = rval1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The xml document looks like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;&amp;lt;soap:Body&amp;gt;&amp;lt;GetStndAddressResponse xmlns="http://micron.com/AddrStnd/"&amp;gt;&amp;lt;GetStndAddressResult&amp;gt;&amp;lt;stdAddress&amp;gt;5811 N Cosworth Pl&amp;lt;/stdAddress&amp;gt;&amp;lt;stdZipCode&amp;gt;83713-1263&amp;lt;/stdZipCode&amp;gt;&amp;lt;stdState&amp;gt;ID&amp;lt;/stdState&amp;gt;&amp;lt;stdCity&amp;gt;Boise&amp;lt;/stdCity&amp;gt;&amp;lt;/GetStndAddressResult&amp;gt;&amp;lt;/GetStndAddressResponse&amp;gt;&amp;lt;/soap:Body&amp;gt;&amp;lt;/soap:Envelope&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 00:04:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-if-ixml-document-gt-find-from-path-ns/m-p/1325544#M166847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-18T00:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problems using if_ixml_document-&gt;find_from_path_ns</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-if-ixml-document-gt-find-from-path-ns/m-p/1325545#M166848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, your default_uri should be just &lt;A href="http://schemas.xmlsoap.org/soap/envelope/" target="test_blank"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, I do not think the path parameter actually supports XPath syntax, from the documentation it seems to be much simpler than that. Besides, it seems that the default_uri actually works only on the first element in the path, which I believe is a bug. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So something like this should work:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL METHOD document-&amp;gt;find_from_path_ns
EXPORTING
default_uri = 'http://schemas.xmlsoap.org/soap/envelope/'
path = '/Envelope/"http://schemas.xmlsoap.org/soap/envelope/:Body"/"http://micron.com/AddrStnd/:GetStndAddressResponse"'
receiving
rval = rval1
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice the full namespace URI in front of the element names and double quotes around each qualified element name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Full XPath functionality is possible with  cl_xslt_processor class (set_expression and RUN( PROGNAME = '' ) methods), but it's kind of an undocumented feature.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 21:36:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-using-if-ixml-document-gt-find-from-path-ns/m-p/1325545#M166848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T21:36:08Z</dc:date>
    </item>
  </channel>
</rss>

