<?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 Re: Parsing SOAP XML response - Loop 1 element for variable names and link to N elements for values in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Parsing-SOAP-XML-response-Loop-1-element-for-variable-names-and/m-p/2250893#M35016</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Please have a look at this component tXMLMap which is&amp;nbsp;an advanced component fine-tuned for transforming and routing XML data flow (data of the &lt;SPAN class="ph uicontrol"&gt;Document&lt;/SPAN&gt; type), especially when processing numerous XML data sources, with or without flat data to be joined.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="https://help.talend.com/reader/oF8xI4O2NvHPfUit2M6rZQ/tef5s62XQ1kK0IzoVtkdSA" href="https://help.talend.com/reader/oF8xI4O2NvHPfUit2M6rZQ/tef5s62XQ1kK0IzoVtkdSA" target="_self" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/oF8xI4O2NvHPfUit2M6rZQ/tef5s62XQ1kK0IzoVtkdSA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Let us know if it is OK with you.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
    <pubDate>Mon, 20 May 2019 07:54:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-20T07:54:00Z</dc:date>
    <item>
      <title>Parsing SOAP XML response - Loop 1 element for variable names and link to N elements for values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parsing-SOAP-XML-response-Loop-1-element-for-variable-names-and/m-p/2250892#M35015</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am having some trouble figuring out how to parse a XML response from a SOAP web service that I consume. The full integration will have a few hundred variables, but here is a truncated example XML with some redacted information:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&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;InvokeMethodResponse xmlns="http://someExample.com/webservices/WebServiceInterface"&amp;gt;
      &amp;lt;InvokeMethodResult&amp;gt;
        &amp;lt;DataSet xmlns=""&amp;gt;
          &amp;lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="Results"&amp;gt;
            &amp;lt;xs:element name="Results" msdata:IsDataSet="true" msdata:Locale="fi-FI"&amp;gt;
              &amp;lt;xs:complexType&amp;gt;
                &amp;lt;xs:choice minOccurs="0" maxOccurs="unbounded"&amp;gt;
                  &amp;lt;xs:element name="Values" msdata:Locale="fi-FI"&amp;gt;
                    &amp;lt;xs:complexType&amp;gt;
                      &amp;lt;xs:sequence&amp;gt;
                        &amp;lt;xs:element name="ts" type="xs:dateTime" /&amp;gt;
                        &amp;lt;xs:element name="value0" msdata:Caption="Tagname_A:av Avg value (SERVER!Tagname_A:av)" type="xs:float" minOccurs="0" /&amp;gt;
                        &amp;lt;xs:element name="status0" msdata:Caption="Tagname_A:av Avg status (SERVER!Tagname_A:av)" type="xs:string" minOccurs="0" /&amp;gt;
                        &amp;lt;xs:element name="value1" msdata:Caption="Tagname_B:av Avg value (SERVER!Tagname_B:av)" type="xs:float" minOccurs="0" /&amp;gt;
                        &amp;lt;xs:element name="status1" msdata:Caption="Tagname_B:av Avg status (SERVER!Tagname_B:av)" type="xs:string" minOccurs="0" /&amp;gt;
                        &amp;lt;xs:element name="value2" msdata:Caption="Tagname_C:me Avg value (SERVER!Tagname_C:me)" type="xs:float" minOccurs="0" /&amp;gt;
                        &amp;lt;xs:element name="status2" msdata:Caption="Tagname_C:me Avg status (SERVER!Tagname_C:me)" type="xs:string" minOccurs="0" /&amp;gt; 
                      &amp;lt;/xs:sequence&amp;gt;
                    &amp;lt;/xs:complexType&amp;gt;
                  &amp;lt;/xs:element&amp;gt;
                &amp;lt;/xs:choice&amp;gt;
              &amp;lt;/xs:complexType&amp;gt;
              &amp;lt;xs:unique name="Constraint1" msdata:PrimaryKey="true"&amp;gt;
                &amp;lt;xs:selector xpath=".//Values" /&amp;gt;
                &amp;lt;xs:field xpath="ts" /&amp;gt;
              &amp;lt;/xs:unique&amp;gt;
            &amp;lt;/xs:element&amp;gt;
          &amp;lt;/xs:schema&amp;gt;
          &amp;lt;diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&amp;gt;
            &amp;lt;Results&amp;gt;
              &amp;lt;Values diffgr:id="Values1" msdata:rowOrder="0"&amp;gt;
                &amp;lt;ts&amp;gt;2019-04-10T15:00:00+03:00&amp;lt;/ts&amp;gt;
                &amp;lt;value0&amp;gt;46.1837425&amp;lt;/value0&amp;gt;
                &amp;lt;status0&amp;gt;Good&amp;lt;/status0&amp;gt;
                &amp;lt;value1&amp;gt;5.02286&amp;lt;/value1&amp;gt;
                &amp;lt;status1&amp;gt;Good&amp;lt;/status1&amp;gt;
                &amp;lt;value2&amp;gt;26.2978439&amp;lt;/value2&amp;gt;
                &amp;lt;status2&amp;gt;Good&amp;lt;/status2&amp;gt;
              &amp;lt;/Values&amp;gt;
            &amp;lt;/Results&amp;gt;
          &amp;lt;/diffgr:diffgram&amp;gt;
        &amp;lt;/DataSet&amp;gt;
      &amp;lt;/InvokeMethodResult&amp;gt;
    &amp;lt;/InvokeMethodResponse&amp;gt;
  &amp;lt;/soap:Body&amp;gt;
&amp;lt;/soap:Envelope&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I need to parse the variable names (@msdata:Caption) from the xs:element loop in the xs:sequence element and link those to the variable values in .../diffgr:diffgram/Results/Values.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The main problem I have is that there can be an arbitrary number of variables in the response, my goal is to get a schema like:&lt;/P&gt; 
&lt;P&gt;TagName - String | Value - Double | Status - String&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have tried creating a metadata file based on the example, but I can only get it to output "@name" and "@msdata:Caption" fields, none of the actual Values or Status. Do I need to create some custom Java to parse this?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;/Jani&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 15:19:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parsing-SOAP-XML-response-Loop-1-element-for-variable-names-and/m-p/2250892#M35015</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-10T15:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing SOAP XML response - Loop 1 element for variable names and link to N elements for values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parsing-SOAP-XML-response-Loop-1-element-for-variable-names-and/m-p/2250893#M35016</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Please have a look at this component tXMLMap which is&amp;nbsp;an advanced component fine-tuned for transforming and routing XML data flow (data of the &lt;SPAN class="ph uicontrol"&gt;Document&lt;/SPAN&gt; type), especially when processing numerous XML data sources, with or without flat data to be joined.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="https://help.talend.com/reader/oF8xI4O2NvHPfUit2M6rZQ/tef5s62XQ1kK0IzoVtkdSA" href="https://help.talend.com/reader/oF8xI4O2NvHPfUit2M6rZQ/tef5s62XQ1kK0IzoVtkdSA" target="_self" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/oF8xI4O2NvHPfUit2M6rZQ/tef5s62XQ1kK0IzoVtkdSA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Let us know if it is OK with you.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 07:54:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parsing-SOAP-XML-response-Loop-1-element-for-variable-names-and/m-p/2250893#M35016</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-20T07:54:00Z</dc:date>
    </item>
  </channel>
</rss>

