Jump to content

New to XML, export help needed


michele

This topic is 3465 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...

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!

Link to comment
Share on other sites

This topic is 3465 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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