AnsweredAssumed Answered

Import XML

Question asked by Xjoe1741 on Jun 28, 2010
Latest reply on Jun 28, 2010 by Xjoe1741

Title

Import XML

Post

Filemaker 11 ADV

Windows 7

 

I modified the stylesheet in post  This post message 2 to work with my import. But nothing gets imported. I'm not sure what to replace

<xsl:for-each select="Paper/Body/Category/Notice">

  with. here's my xml I need to import. 

 

 

  <?xml version="1.0" encoding="UTF-8" ?> 
- <eveapi version="2">
  <currentTime>2010-06-28 15:05:29</currentTime> 
- <result>
- <rowset name="characters" key="characterID" columns="name,characterID,corporationName,corporationID">
  <row name="Ochawe Bake" characterID="1308398954" corporationName="The Baked Group" corporationID="1995712557" /> 
  <row name="Zenur Bake" characterID="1357753370" corporationName="The Baked Group" corporationID="1995712557" /> 
  <row name="Zulom Bake" characterID="1877104036" corporationName="The Baked Group" corporationID="1995712557" /> 
  </rowset>
  </result>
  <cachedUntil>2010-06-28 15:16:39</cachedUntil> 
  </eveapi>

 Here's what I got

 

 

 

<?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="yes"/>

     <xsl:template match="/">

          <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
               <ERRORCODE>0</ERRORCODE>
               <PRODUCT BUILD="" NAME="" VERSION=""/>
               <DATABASE DATEFORMAT="" LAYOUT="" NAME="" RECORDS="" TIMEFORMAT=""/>

               <METADATA>
                    <FIELD NAME="name" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
                    <FIELD NAME="characterID" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
                    <FIELD NAME="corporationName" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
                    <FIELD NAME="corporationID" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/>
               </METADATA>

               <RESULTSET FOUND="">

                    <xsl:for-each select="name/characterID/corporationName/corporationID">
                         <ROW MODID="" RECORDID="">
                              <COL>
                                   <DATA>
                                        <xsl:value-of select="name"/>
                                   </DATA>
                              </COL>
                              <COL>
                                   <DATA>
                                        <xsl:value-of select="characterID"/>
                                   </DATA>
                              </COL>
                              <COL>
                                   <DATA>
                                        <xsl:value-of select="corporationName"/>
                                   </DATA>
                              </COL>
                              <COL>
                                   <DATA>
                                        <xsl:value-of select="corporationID"/>
                                   </DATA>
                              </COL>
                         </ROW>
                    </xsl:for-each>

               </RESULTSET>
          </FMPXMLRESULT>

     </xsl:template>
</xsl:stylesheet>

 

 

I need to import name, characterID , corporationName, and corporationID from all 3 rows. but there will not always be 3 rows, from 1 to 3.

 

Thanks in advance

Outcomes