anna.antonioli

XML Import

Discussion created by anna.antonioli on Sep 23, 2016
Latest reply on Sep 23, 2016 by anna.antonioli

Hi all,

I need to import into filemaker table an XML file as this:

 

<?xml version="1.0" encoding="utf-8"?>
<Account>
  <Field APIName="WrntyID">6029065</Field>
  <Field APIName="ExternalID">1761A</Field>
  <Field APIName="Name">sayIT SA</Field>
</Account>

 

now I'am trying to create the xls file.

This is my xls file....

 

<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
            <METADATA>
                <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="WrntyID" TYPE="TEXT"/>
                <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="ExternalID" TYPE="TEXT"/>
                <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Name" TYPE="TEXT"/>           
            </METADATA>
            <RESULTSET>
                <ROW>
                    <COL>
                        <DATA><xsl:value-of select=“Account/Field[1]" /></DATA>
                    </COL>
                    <COL>
                        <DATA><xsl:value-of select=“Account/Field[2]” /></DATA>
                    </COL>
                    <COL>
                        <DATA><xsl:value-of select=“Account/Field[3]” /></DATA>
                    </COL>
                    </ROW>
            </RESULTSET>
        </FMPXMLRESULT>
    </xsl:template>
</xsl:stylesheet>

 

This instruction <xsl:value-of select=“Account/Field[1]"/> doesn't work.

 

What is the right syntax to retrive the value of the first TAG FIELD? Then the second end so on...?

Many thanks

Anna

Outcomes