November 9, 201015 yr I am exporting to XML and producing a Tab-Delimited file. Everything exports well except for text fields that have multiple lines in them. How do I make the stylesheet handle the multiple lines per field so they stay in the same field? Example of multiple lines: This tool is 18Volts. This tool has no charger. Also, how do I change the stylesheet to enclose each field with double-quotes? Thank you Fenton for your excellent help on this earlier. You provided a stylesheet that works very well. Here is the stylesheet that I have: <?xml version="1.0" encoding="utf-8"?> xmlns:fm="http://www.filemaker.com/fmpxmlresult" exclude-result-prefixes="fm" > Edited November 9, 201015 yr by Guest
November 9, 201015 yr Your stylesheet does NOT produce a CSV file (there isn't a comma anywhere in the code). Perhaps it produces a tab-separated file (hard to tell what's inside the element)? A tab-separated file cannot contain in-field carriage returns or tabs - so the question is what do you want to have there instead.
November 9, 201015 yr Author Thank you for the correction. It is a Tab-delimited file that I am making. I am submitting two files here for perusal. The first (this_file_works) was exported from FMP as a .mer file, opened in OpenOffice and then saved as tab-delimited. The second (this_file_doesnt_work) was exported from FMP as an xml using the stylesheet that I posted. Can you help? I need to get the 2nd file to output just like the first so I can eliminate the extra steps after exporting. Incidentally, Excel, OpenOffice for Windows, and OpenOffice for Mac all require different processing steps to create the same type of file. That's why I want to use xml with a stylesheet, to eliminate that for my clients. this_one_works.txt.txt this_one_doesnt_work.txt
November 9, 201015 yr This (the "working" file) is a very strange format: a tab-separated file with fields (and field names) enclosed in quotes. In any case, if that's what you really need, it can be made - but you still need to provide an answer to my earlier question. I don't know if the source had any in-field carriage returns and/or tabs; I suggest you make a test and see what happens to those in your current process, so that the new process can do the same.
November 9, 201015 yr Author I have to provide feeds to 3 different channels and may have gotten them mixed up. So, attached is the source xml as exported from FMP (test_xml.txt). It has one additional field that the previous attachments don't have, the last one. Also attached (textworks.txt) is the same date that has been exported as a .mer file, opened and then closed within OpenOffice, and is ready for uploading to the website. It looks like that last field had carriage returns in the XML file and they were converted to VT (vertical tabs?) in the tab-delimited file that came out of OpenOffice. Whatever they were turned into, they work when importing into the website. test_xml.txt.txt testworks.txt
November 9, 201015 yr It looks like that last field had carriage returns in the XML file and they were converted to VT (vertical tabs?) Yes, that is correct - but unfortunately it won't work, because a vertical tab is not a legal XML character. What is your target application? As I mentioned earlier, the "working file" has a weird non-standard format. Perhaps there is another format that will be accepted?
November 9, 201015 yr Author The target application is an Amazon Seller Central Product Feed. We use this feed to create new amazon listings and to revise quantities and prices on amazon.
November 9, 201015 yr Author BTW, just of curiosity - does this one work? Yes, this one worked perfectly. Did you alter the stylesheet?
November 10, 201015 yr No, not yet - I am still trying to understand the rules here. Could you also test this one? result.txt
November 10, 201015 yr Author No, not yet - I am still trying to understand the rules here. Could you also test this one? Yes, this one works as well.
Create an account or sign in to comment