September 8, 200421 yr How can i import XML data into repeating fields in FM6? I was able to export repeating fields to XML in FMPXMLRESULT grammar, and it looked like this: ... <RESULTSET FOUND="1"> <ROW MODID="1" RECORDID="1"> <COL> <DATA>some data</DATA> <DATA>different data</DATA> <DATA></DATA> ... </COL> </ROW> </RESULTSET> ... But i wasn't sure of its usefulness. Additionally, immediately after exporting this file (without a stylesheet) i try importing it (again, without a stylesheet--no transformation is needed, because it's FM's native grammar, right?) and wind up with only the first repetition populated, with data from the first <DATA> element. My issue is that i have other (non-FM) XML that looks like: ... <elementtypeA> <elementtypeB>some data</elementtypeB> <elementtypeB>different data</elementtypeB> </elementA> ... And i want to import each of the elements <elementTypeB> into one repeating field, so that the first repetition contains "some data" and the second repetition contains "different data." But before i can get to writing an XSLT, i need to understand how FMPXMLRESULT imports repeating fields. Any ideas on where to look for examples of such a feat? FM's documentation claims that repeating fields can be used with XML, but does not explain how. Jerry
September 9, 200421 yr But before i can get to writing an XSLT, i need to understand how FMPXMLRESULT imports repeating fields. It is not possible to import data into other repetitions than the first. FMP will export a repeating list correctly, but will bring in only the first data element on import.
September 9, 200421 yr Author Thanks, Jean-Marie. I was afraid that would be the answer. You don't, by chance, have any strategies for working around this issue, do you? I'm thinking of something along the lines of somehow combining all the sibling elements prior to the import, and separating their values with some sort of delimiter. This is not ideal, though, as the values i would be combining may be very long text strings in some cases. Do you know of any better ways than this? J
September 9, 200421 yr "separating their values with some sort of delimiter" Considering an xml : attachment : repeating.xml (sorry, the "code" UBB Code will not work for me) the xsl : attachment: repeating.xsl In FileMaker this will be 2 records, 1 field (element). Field element of record 1 = "some data repeating.zip
Create an account or sign in to comment