AnsweredAssumed Answered

XML import no info ?

Question asked by PaSav-ICT on Apr 2, 2018
Latest reply on Apr 2, 2018 by beverly

Hi,

 

I want to use a website to import data true XML.

 

I have http stringt that gives me a xml output :

 

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

<ArrayOfSets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="https://brickset.com/api/">

  <sets>

    <setID>10092</setID>

    <number>60010</number>

    <numberVariant>1</numberVariant>

    <name>Fire Helicopter</name>

    <year>2013</year>

  </sets>

</ArrayOfSets>

 

I have made a xslt to convert the data :

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

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" />

<xsl:template match="/"> 

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

  <METADATA> 

  <FIELD NAME="setID" TYPE="TEXT"></FIELD> 

  <FIELD NAME="number" TYPE="TEXT"></FIELD>

  </METADATA> 

  <RESULTSET>

 

  <xsl:for-each select="*/sets">

  <ROW> 

  <COL><DATA><xsl:value-of select="setID"></xsl:value-of></DATA></COL> 

  <COL><DATA><xsl:value-of select="number"></xsl:value-of></DATA></COL>

  </ROW>

  </xsl:for-each>

  </RESULTSET>

</FMPXMLRESULT> 

</xsl:template> 

</xsl:stylesheet>

 

But i get no data in the database, i only see the field with matching.

 

If i strip the <xsl:for-each select="*/sets"> part, then i see 1 record but all fields are blank imported.

 

What is wrong withe my syntax ?

Outcomes