Jump to content

AndrewDavis

Newbies
  • Posts

    5
  • Joined

  • Last visited

Everything posted by AndrewDavis

  1. Thanks! Is it possible to create the field names using something like this? First I got a 'need to escape bracket' error, then a 'whitespace' error. Just brainstorming here. <METADATA> <xsl:for-each select="submissions/submission/data/XML_Serializer_Tag"> <FIELD NAME="&lt;xsl:value-of select="label"/&gt;" TYPE="TEXT"/> </xsl:for-each></METADATA>
  2. Thanks so much for your help! The missing ROW tag was a copy/paste error. Unfortunately, the source XML has a variable amount of <XML_Serializer_Tag> tags inside each submission. Is there a way to accommodate for that?
  3. Hello, I have XML data from an online form service (below). How can I get the data into fields in FM? Each record in my FM contains fields for each xml_serializer_tag/value. Also, is there a way to use a ‘for-each’ loop to create the field names in the meta data section (rather than manually describing each)? There is MUCH more data in the actual XML. I was able to create an XSLT that transforms the info. But it was all getting dumped into one field, rather than each into their own. Thanks for your help. XML <?xml version="1.0" encoding="utf-8"?> <response status="ok"> <submissions> <submission> <id>179890809</id> <timestamp>2015-01-21 07:44:55</timestamp> <data> <XML_Serializer_Tag> <field>29367523</field> <label>Email</label> <value>something@somewhere.com</value> </XML_Serializer_Tag> <XML_Serializer_Tag> <field>29367524</field> <label>Name</label> <value>Fry</value> </XML_Serializer_Tag> </data> </submission> <submission> <id>179988171</id> <timestamp>2015-01-27 10:11:54</timestamp> <data> <XML_Serializer_Tag> <field>29367523</field> <label>Email</label> <value>test@example.com</value> </XML_Serializer_Tag> <XML_Serializer_Tag> <field>29367524</field> <label>Name</label> <value>Leela</value> </XML_Serializer_Tag> </data> </submission> <submission> <id>17998369</id> <timestamp>2015-02-17 11:15:24</timestamp> <data> <XML_Serializer_Tag> <field>29367523</field> <label>Email</label> <value>some@example.com</value> </XML_Serializer_Tag> <XML_Serializer_Tag> <field>29367524</field> <label>Name</label> <value>Bender</value> </XML_Serializer_Tag> </data> </submission> </submissions> </response> XSLT attempt (zero errors, but not getting the data into fields the way I would like) <?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 NAME="Email" TYPE="TEXT"/> <FIELD NAME="Name" TYPE="TEXT"/> </METADATA> <RESULTSET FOUND=""> <xsl:for-each select="//submission"> <ROW MODID="" RECORDID=""> <COL> <DATA><xsl:value-of select="data/XML_Serializer_Tag/value"/></DATA> </COL> </xsl:for-each> </RESULTSET> </FMPXMLRESULT> </xsl:template> </xsl:stylesheet>
  4. Worked perfectly! The piece that I was really not understanding was: <xsl:for-each select="rss/channel/item"> Many thanks for your help! -Andrew
  5. Would it be possible to for me to piggyback on this post? I’m new and I don’t know all the forum etiquette. Please let me know if I should post this elsewhere. I would like to import an rss feed into filemaker. I understand that I need a xslt file to transform the data into something that filemaker understands. And I found some xslt templates online, but I’m not very knowledgeable about xslt, and I can’t figure out how to make them work for my situation. Would anyone be able to help me with this? Thanks so much in advance. This is an example of the source rss: http://www.sierranevada.com/downloads/formstack-test-rssfeed.xml This is my attempt at xslt. As you can see, not very good: http://www.sierranevada.com/downloads/formstack-rss-transform-test.xslt -Andrew
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.