michele Posted August 25, 2014 Posted August 25, 2014 We need to create an XML file from data of Filemaker 12 to import it into an online bookkeeping solution. Tried to do it using Excel but the XML is too complex for Excel. So, if I understand well I have to write a XSLT-stylesheet to convert Filemaker XML to the one I need. Can someone provide me with a link to a tutorial I could use? Been to W3-school but...I need some real Filemaker examples to understand cause I'm a bit lost here. I have a xsd-sheet is that of any use? Thank you for reading and eventually answering this question.
comment Posted August 25, 2014 Posted August 25, 2014 Can someone provide me with a link to a tutorial I could use? Been to W3-school but...I need some real Filemaker examples to understand cause I'm a bit lost here. Don't know about a Filemaker-specific tutorial, but there are quite a few examples right here on these forums. Try searching for "stylesheet" in this ('XML/XSL') and 'Importing and Exporting' forums. Most of these examples were posted by Fenton or by me. I have a xsd-sheet is that of any use? Probably not. A good example of what your output should look like is much more useful.
Joost Miltenburg Posted October 1, 2014 Posted October 1, 2014 Which bookkeeping solution. I have build several in the past, so I might be able to help.
beverly Posted October 2, 2014 Posted October 2, 2014 I does depend on the schema for the bookeeping solution, as Joost says. You can't just "export" FMP as XML and create a XSLT without knowing the "mapping" for the import. You build the XSLT out of the schema from the you import INTO. Something like: <root> <nextElement attribute1="yes"> data here </nextElement <anotherElement> <child1>hello</child1> <child2>world</child2> </anotherElement> </root> Your stylesheet has headers and basically copies the schema, then uses "replace-type" functions (or merge-type, if that makes more sense: ... snip <anotherElement> <child1><xsl:value-of select="fm:ROW/fm:COL[1]/fm:DATA" /></child1> <child2><xsl:value-of select="fm:ROW/fm:COL[2]/fm:DATA" /></child2> </anotherElement> ... end snip This tells the process to "read" the exported fields (COLs) from FM and push into the document. When the document is written all the correct values are there. This becomes XML that the other application can read with all your exported values. Of course, there is more to the XSLT than that, but you can see that the schema is really important to creating it!
Recommended Posts
This topic is 3773 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now