title: Progress 4GL: How to convert an xml serialized table to a dataset?
body: <p>I am accessing a method of a soap webservice, it is responding me the following result.</p>
  
  <pre><code>&lt;ExportTableDataResponse xmlns="http://sisteplant.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;ExportTableDataResult&gt;
          &lt;root xmlns=""&gt;
              &lt;table name="Search"&gt;
                  &lt;r&gt;
                      &lt;c name="c0"&gt;1&lt;/c&gt;
                      &lt;c name="c2"&gt;05/09/2014 10:23:00&lt;/c&gt;
                      &lt;c name="c3"&gt;05/09/2014 00:00:00&lt;/c&gt;
                      &lt;c name="c5"&gt;PRE&lt;/c&gt;
                      &lt;c name="c6"&gt;0&lt;/c&gt;
                      &lt;c name="c7"&gt;1&lt;/c&gt;
                      &lt;c name="c8"&gt;0&lt;/c&gt;
                      &lt;c name="c9"&gt;m0000p&lt;/c&gt;
                      &lt;c name="c10"&gt;ALM06&lt;/c&gt;
                      &lt;c name="c11"&gt;A1&lt;/c&gt;
                      &lt;c name="c12"&gt;1,0000&lt;/c&gt;
                      &lt;c name="c13"&gt;1000,00000&lt;/c&gt;
                      &lt;c name="c14"&gt;PRE&lt;/c&gt;
                      &lt;c name="c15"&gt;1&lt;/c&gt;
                      &lt;c name="c17"&gt;0&lt;/c&gt;
                  &lt;/r&gt;
          &lt;/table&gt;
      &lt;/root&gt;
  &lt;/ExportTableDataResult&gt;
  </code></pre>
  
  <p></p>
  
  <p>I tried to convert the xml for a dataset using the following code but not work. I using the version 10.2b of progress</p>
  
  <pre><code>   DEFINE TEMP-TABLE MessageTypeCode NO-UNDO XML-NODE-NAME 'r'
      FIELD NAME                 AS CHARACTER XML-NODE-TYPE "Attribute"
      FIELD ElementValue         AS CHARACTER XML-NODE-TYPE "Text"
      FIELD c_recid AS RECID     XML-NODE-TYPE "Hidden".
  
  DEFINE DATASET ReceiverInfo XML-NODE-NAME 'table'
        FOR  MessageTypeCode.
  
  DATASET ReceiverInfo:READ-XML("file", "c:\temp\resultado-pesquisa.xml", "empty", ?, FALSE, ?, "IGNORE") NO-ERROR.
  
  FOR EACH MessageTypeCode:
      DISP MessageTypeCode.ElementValue FORMAT "X(30)"
           MessageTypeCode.NAME
           MessageTypeCode.c_recid.
      PAUSE.
  END.
  </code></pre>
  
  <p>Then someone has some sujestion how I can convert this xml for a dataset?</p>
  
  <p>Thanks for your help!</p>