John Fowler Posted December 30, 2005 Posted December 30, 2005 I'm in the process of switching my postage solution (for 7000 orders/year) to Endicia. Their Mac version is finally up to snuff, and their latest beta even integrates customs forms into the labels. Good stuff. I can export via XML and get Endicia to process the file. It then automatically generates an output file that I need to re-import to Filemaker. I really only need two lines: An order ID match field ("Package ID"), and then the tracking number ("PIC"). However, I get a parsing error, which is undoubtedly the result of my total lack of knowledge of XML/XSL. I got the XSL for the export from this forum (with a little cutting and pasting to correct for my field names), and I'm hoping that I'll be able to get the fix for this here, too. Here's the file that Endicia generates: Success 9101805213907328977972 2.11 0 20051230105139 20051230 12345 The parsing error only hangs up on ReferenceID, even though several of the other fields have no analogs in my DB. Any insight is welcome. I'd even just take a simple XSL template. Thanks! John
Breezer Posted December 30, 2005 Posted December 30, 2005 You seem to have the same problem i had but thanks to fenton, my issue has been resolved. Please follow this link, it might help. http://fmforums.com/forum/showtopic.php?tid/172630/post/188435/hl//#188435
Fenton Posted December 30, 2005 Posted December 30, 2005 Here is an xsl I did for Endicia. It's been awhile since I used it, but the fields look the same: <?xml version="1.0" encoding="UTF-8"?> 0 0
John Fowler Posted December 31, 2005 Author Posted December 31, 2005 That looks great--thanks for that input. However, I get this error now (at least it's a new error!) XML parsing error: The XML or Text declaration must start at line/column 1/1 Line Number: 1 Column Number: 8 Any ideas? John
Fenton Posted January 1, 2006 Posted January 1, 2006 (edited) Ah, we've seen this error before (and will likely see it again). It means exactly what it says. The text on this page has spaces added at the beginning of the lines; probably to offset it from the line. It's a problem when you copy/paste xml from here, because, well, "The XML or Text declaration must start at line/column 1/1" So remove the 1st space. Or, optionally, remove all the 1st spaces. Get a text editor, either BBEdit or its little brother TextWrangler (free, http://www.barebones.com -). Show Invisibles, show spaces. Do a find/replace, with grep. Find: ^ + (There's a space between, + means "one or more") Replace: (nothin') Set the Language to xml, and it will color the syntax; probably will color it automatically anyway. Get the BBTidy plug-in: http://www.barebones.com/support/bbedit/plugin_library.shtml It can both check and format your xml (if you choose the settings in the configuration dialog). (BBEdit appears to do this internally, with the Tidy command, but its diagnostics only work with html; it can only "Reflow" xml. It is NOT a complete Tidy implementation by any means. It's kind of a bug. I complained quite a while ago, but they haven't fixed it. You can run BBTidy from the Tools menu however, and it works OK. It seems to only work well for Unicode on the UTF-16 setting, which adds an extra character that you have to then remove. It's a little annoying, but not a big deal. There is no good Mac native xml application that I know of. There are several Java-based, which work OK; but their file navigation is so backward that I hate to use them for simple editing. I do not want to traverse my hard drive every time to find a file. If anyone knows a real Mac xml editor, please tell us.) Edited January 1, 2006 by Guest Happy New Year!
John Fowler Posted January 2, 2006 Author Posted January 2, 2006 Ah....Alles klaar, herr Komissar. Thanks for the tip. I didn't even notice the extra spaces. As to the XML editor, I've just been editing in TextEdit. Not too robust, but at least it lets me do things in plain text. Dreamweaver (which I use to manage my website, anyway) includes XML tools, but I haven't tried it for this purpose. Thanks again for your help--everything seems to be working well now. John
Recommended Posts
This topic is 7242 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