title: generate a different number of columns based on input number
body: <p>Suppose I have some XML data that has an unknown number of sub-nodes. Is there a method that allows me to input the number of sub-nodes into the program as a parameter, and have it process them? current code is something like this</p>
  
  <pre><code>    SourceXML = LOAD '$input' using org.apache.pig.piggybank.storage.XMLLoader('$TopNode') as test:chararray;
  
  test2 = LIMIT SourceXML 3;
  
  test3 = FOREACH test2 GENERATE REGEX_EXTRACT(test,'&lt;$tag1&gt;(.*)&lt;/$tag1&gt;',1),
      REGEX_EXTRACT(test,'&lt;$tag2&gt;(.*)&lt;/$tag2&gt;',1);
  
  dump test3;
  </code></pre>
  
  <p>however I may not know in advance how many simple elements there are in the target data (how many $tag# there are). I am hoping to use a .txt file containing parameters that looks something like this:</p>
  
  <blockquote>
    <p>input=/inputpath/lowerlevelsofpath</p>
    
    <p>numberSimpleElements=3</p>
    
    <p>tag1=tag1name</p>
    
    <p>tag2=tag2name</p>
    
    <p>tag3=tag3name</p>
  </blockquote>
  
  <p>With a regex_extract being done on each tag in the input file</p>
  
  <p>Any ideas on how to accomplish this?</p>