Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Help importing from Endicia XML output


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

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

Posted (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 by Guest
Happy New Year!
Posted

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

This topic is 6899 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.