title: Reading XML file to Temp-table in Progress-4gl
body: <p>I'm using <strong>OpenEdge 10.2A</strong>.</p>
  
  <p>My XML file has only one <strong>TABLE_NAME</strong> record and it has many fields but a simplified version is:</p>
  
  <pre><code>&lt;Table_Name&gt;
      &lt;Field_Name_1&gt;Value_1&lt;/Field_Name_1&gt;
      &lt;Field_Name_2&gt;Value_2&lt;/Field_Name_2&gt;
  &lt;/Table_Name&gt;
  </code></pre>
  
  <p>In order to read it, I use the code:</p>
  
  <pre><code>DEFINE TEMP-TABLE Table_Name NO-UNDO
      FIELD Field_Name_1 AS CHAR
      FIELD Field_Name_2 AS CHAR
  .
  
  TEMP-TABLE Table_Name:READ-XML("File","C:\myFile.xml","empty",?,?,?,?).
  
  DEF VAR i AS INT NO-UNDO.
  FOR EACH Table_Name: 
      i=i + 1.
  END.
  DISP i.
  </code></pre>
  
  <p>It displays <strong>0</strong> (zero) as the result, meaning it does not read the XML records in the file.</p>
  
  <p>If I change my XML file as follows:</p>
  
  <pre><code>&lt;My_XML_Records&gt;
        &lt;Table_Name&gt;
            &lt;Field_Name_1&gt;Value_1&lt;/Field_Name_1&gt;
            &lt;Field_Name_2&gt;Value_2&lt;/Field_Name_2&gt;
        &lt;/Table_Name&gt;
  &lt;/My_XML_Records&gt;
  </code></pre>
  
  <p>the same code displays <strong>1</strong> (one)</p>
  
  <p>Since XML files are produced by other programs and the format is fixed, is there a way to make the code to read the XML files properly?</p>