xmlpentahopdispoon

XML input in Spoon PDI


I have searcher all around but havent found the answer yet. I have this type of XML:

<?xml version="1.0"?>
 <NBATeams>  
   <Row>
    <Data Type="String">Conferencia</Data>
    <Data Type="String">División</Data>
    <Data Type="String">Equipo</Data>
    <Data Type="String">Ciudad</Data>
    <Data Type="String">Estado</Data>
    <Data Type="String">Pabellón</Data>
    <Data Type="String">Fundado</Data>
    <Data Type="String">Patrocinio</Data>
   </Row>
   <Row>
    <Data Type="String">Conferencia Oeste</Data>
    <Data Type="String">Noroeste</Data>
    <Data Type="String">Denver Nuggets</Data>
    <Data Type="String">Denver</Data>
    <Data Type="String">CO</Data>
    <Data Type="String">Pepsi Center</Data>
    <Data Type="Number">1967</Data>
    <Data Type="String">Western Union</Data>
   </Row>
   <Row>
    <Data Type="String">Conferencia Oeste</Data>
    <Data Type="String">Noroeste</Data>
    <Data Type="String">Minnesota Timberwolves</Data>
    <Data Type="String">Minneapolis</Data>
    <Data Type="String">MN</Data>
    <Data Type="String">Target Center</Data>
    <Data Type="Number">1989</Data>
    <Data Type="String">Fitbit</Data>
   </Row>
   <Row>
    <Data Type="String">Conferencia Oeste</Data>
    <Data Type="String">Noroeste</Data>
    <Data Type="String">Oklahoma City Thunder</Data>
    <Data Type="String">Oklahoma City</Data>
    <Data Type="String">OK</Data>
    <Data Type="String">Chesapeake Energy Arena</Data>
    <Data Type="Number">1967</Data>
    <Data Type="String">Love's</Data>
   </Row>

And I need to load it into a table in Spoon by using the XML INPUT.

I have used the Loop XPath as /NBATeams/Row but it finds only one field "Data"

Any idea?


Solution

  • @Thony is right. You need to use data[n]. You can see the transformation from Here