July 19, 20169 yr http://jensteich.de/fmfaq/export/xslt-for-simple-cases/ <!-- xslt stylesheet importing xml data into FileMaker for easy cases like: <root> <record> <field1>....</field1> <field2>....</field2> <field3>....</field3> <... any number of fields ... </record> ... any number of records 'root', 'record', 'fieldx' can be any names. ~jens
July 19, 20169 yr You have way too much code - most of it will be ignored during the import. You also have a line that shouldn't be there: FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="FeldName" TYPE="TEXT"/> The entire stylesheet could be shortened to just: <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> <xsl:for-each select="*[1]/*"> <FIELD name="{name()}"/> </xsl:for-each> </METADATA> <RESULTSET> <xsl:for-each select="*"> <ROW> <xsl:for-each select="*"> <COL><DATA><xsl:value-of select="."/></DATA></COL> </xsl:for-each> </ROW> </xsl:for-each> </RESULTSET> </FMPXMLRESULT> </xsl:template> </xsl:stylesheet> (assuming version 11 or higher). In fact, it could be shortened even further, but that's for another occasion.
Create an account or sign in to comment