<?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 XML With labeled metadata in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/XML-With-labeled-metadata/m-p/2217914#M13318</link>
    <description>&lt;P&gt;I have XML that I have retrieved from an API that looks something like this&lt;/P&gt;
&lt;PRE&gt;&amp;lt;dataset
    xmlns="http://developer.cognos.com/schemas/xmldata/1/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
    xs:schemaLocation="http://developer.cognos.com/schemas/xmldata/1/ xmldata.xsd"
&amp;gt;
--&amp;gt;
    &amp;lt;metadata&amp;gt;
          &amp;lt;item name="Column1" type="xs:string" length="12"/&amp;gt;
          &amp;lt;item name="Column2" type="xs:string" length="84"/&amp;gt;
          &amp;lt;item name="Column3" type="xs:string" length="6"/&amp;gt;
          &amp;lt;item name="Column4" type="xs:string" length="14"/&amp;gt;
          &amp;lt;item name="Column5" type="xs:string" length="20"/&amp;gt;
          &amp;lt;item name="Column6" type="xs:string" length="2414"/&amp;gt;
          &amp;lt;item name="Column7" type="xs:dateTime"/&amp;gt;
          &amp;lt;item name="Column8" type="xs:decimal" scale="6" precision="16"/&amp;gt;
    &amp;lt;/metadata&amp;gt;
    &amp;lt;data&amp;gt;
        &amp;lt;row&amp;gt;
            &amp;lt;value&amp;gt;word  &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt; words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;88254  &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;50011   &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;2019-10-23T00:00:00&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;10.51&amp;lt;/value&amp;gt;
        &amp;lt;/row&amp;gt;
        &amp;lt;row&amp;gt;
            &amp;lt;value&amp;gt;words  &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt; words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;88254  &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;50060   &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;2019-10-23T00:00:00&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;20.96&amp;lt;/value&amp;gt;
        &amp;lt;/row&amp;gt;
    &amp;lt;/data&amp;gt;
&amp;lt;/dataset&amp;gt;&lt;/PRE&gt;
&lt;P&gt;The differences between my real data and this anonymized sample is that my real data has additional rows and columns. How do map this XML document to a csv with the metadata set as shown in the XML? Currently the whole document is in one talend "row". I have tried to use tExtractXMLField, but can only get the first value in each row. I can't figure out how to get the schema to map from the XML itself.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:16:56 GMT</pubDate>
    <dc:creator>lizzy1</dc:creator>
    <dc:date>2024-11-16T04:16:56Z</dc:date>
    <item>
      <title>XML With labeled metadata</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-With-labeled-metadata/m-p/2217914#M13318</link>
      <description>&lt;P&gt;I have XML that I have retrieved from an API that looks something like this&lt;/P&gt;
&lt;PRE&gt;&amp;lt;dataset
    xmlns="http://developer.cognos.com/schemas/xmldata/1/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
    xs:schemaLocation="http://developer.cognos.com/schemas/xmldata/1/ xmldata.xsd"
&amp;gt;
--&amp;gt;
    &amp;lt;metadata&amp;gt;
          &amp;lt;item name="Column1" type="xs:string" length="12"/&amp;gt;
          &amp;lt;item name="Column2" type="xs:string" length="84"/&amp;gt;
          &amp;lt;item name="Column3" type="xs:string" length="6"/&amp;gt;
          &amp;lt;item name="Column4" type="xs:string" length="14"/&amp;gt;
          &amp;lt;item name="Column5" type="xs:string" length="20"/&amp;gt;
          &amp;lt;item name="Column6" type="xs:string" length="2414"/&amp;gt;
          &amp;lt;item name="Column7" type="xs:dateTime"/&amp;gt;
          &amp;lt;item name="Column8" type="xs:decimal" scale="6" precision="16"/&amp;gt;
    &amp;lt;/metadata&amp;gt;
    &amp;lt;data&amp;gt;
        &amp;lt;row&amp;gt;
            &amp;lt;value&amp;gt;word  &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt; words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;88254  &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;50011   &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;2019-10-23T00:00:00&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;10.51&amp;lt;/value&amp;gt;
        &amp;lt;/row&amp;gt;
        &amp;lt;row&amp;gt;
            &amp;lt;value&amp;gt;words  &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt; words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;88254  &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;50060   &amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;words&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;2019-10-23T00:00:00&amp;lt;/value&amp;gt;
            &amp;lt;value&amp;gt;20.96&amp;lt;/value&amp;gt;
        &amp;lt;/row&amp;gt;
    &amp;lt;/data&amp;gt;
&amp;lt;/dataset&amp;gt;&lt;/PRE&gt;
&lt;P&gt;The differences between my real data and this anonymized sample is that my real data has additional rows and columns. How do map this XML document to a csv with the metadata set as shown in the XML? Currently the whole document is in one talend "row". I have tried to use tExtractXMLField, but can only get the first value in each row. I can't figure out how to get the schema to map from the XML itself.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:16:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-With-labeled-metadata/m-p/2217914#M13318</guid>
      <dc:creator>lizzy1</dc:creator>
      <dc:date>2024-11-16T04:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: XML With labeled metadata</title>
      <link>https://community.qlik.com/t5/Talend-Studio/XML-With-labeled-metadata/m-p/2217915#M13319</link>
      <description>&lt;P&gt;The way you need to do this can be seen in the example job below....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-10-28 at 10.07.33.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7wC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157780i4932916D3515C6B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7wC.png" alt="0683p000009M7wC.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The configuration of the tFileInputXML is as below....&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-10-28 at 10.12.06.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7uW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128454iC291C31F25E511A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7uW.png" alt="0683p000009M7uW.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;The tExtractXMLField component is configured as below.....&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2019-10-28 at 10.16.11.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7wM.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152274i47FC5A82F38826D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7wM.png" alt="0683p000009M7wM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Essentially you are looping on /dataset/data/row and to retrieve each of the value columns you use the syntax "./value[{number of row}]"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 10:17:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/XML-With-labeled-metadata/m-p/2217915#M13319</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-28T10:17:12Z</dc:date>
    </item>
  </channel>
</rss>

