AnsweredAssumed Answered

Extract data from FMPXMLRESULT

Question asked by oliver on Sep 14, 2017
Latest reply on Sep 15, 2017 by beverly

Hi,

 

Would some can give me a hand on extracting data from the result returned in FMPXMLRESULT format?

 

I have call CWP XML using script step Insert from URL and cannot work out a right way to extract the return data.

 

Can someone suggest what technique needs to apply? (e.g. xPath)

 

I tried BaseElement plugin's BE_XPATH function call but can't work it right.

 

I want to extract all UserName of the return result as an example, what should i do?

 

Thanks

 

Sample below.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" "https://ghrappsaws.ehrdesign.com/fmi/xml/FMPXMLRESULT.dtd">

<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">

   <ERRORCODE>0</ERRORCODE>

   <PRODUCT BUILD="10/27/2016" NAME="FileMaker Web Publishing Engine" VERSION="15.0.3.308" />

   <DATABASE DATEFORMAT="MM/dd/yyyy" LAYOUT="" NAME="leaveinputdev" RECORDS="3567" TIMEFORMAT="HH:mm:ss" />

   <METADATA>

      <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="id" TYPE="TEXT" />

      <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="UserName" TYPE="TEXT" />

   </METADATA>

   <RESULTSET FOUND="1">

      <ROW MODID="0" RECORDID="3572">

         <COL>

            <DATA>3539</DATA>

         </COL>

         <COL>

            <DATA>John Ng</DATA>

         </COL>

     </ROW>

   </RESULTSET>

</FMPXMLRESULT>

Outcomes