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

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

Recommended Posts

Posted

I am trying to import this XML file that another program produced from a PDF conversion. I am trying to import all the data and images in the PDF file. So the program converted the PDF into a XML file with images. Now I am trying to import the XML file into FM.

I know I need a XSL file to help FM translate the XML file but I know nothing about XML.

So could someone help me with a XSL file to import the XML file.

I have attached the XML file.

Also can FM import images through XML?

Thanks

example.zip

Posted (edited)

Offhand I'd say this is a good example of why PDF is a lousy format for transferring this kind of data. Basically what you've got here are a bunch of paragraphs ( elements) and phrase ( elements). Sometimes they have "item" data in them. But some of the ones at the top have other data, name of the company, address of the company, page number (like we care :-).

I think you're going to have to assume that the top paragraphs (of each page) are always much the same arrangement. The item data seems to start at para 5. The Item ID is within an element (once again, like we care), then the Item name, then its price. This pattern continues for a while.

Then there are the pictures for the items. They have a "fileref" attribute, with a relative path. The 1st part of the path is missing. Does this mean that the pictures are in a folder in with the XML file? I would assume so. In which case they could be imported into FileMaker. But as a separate import. XML is a "text" format, it does not contain image files.

The only thing linking the image to its item is its relative location in the xml file; that is, the 1st image goes with the 1st item; it appears so anyway. But there is nothing in the image name to tie it to that item. You will have to somehow write something into the imagedata element, via an attribute, the item ID I would think.

Basically, this can be done. But it is not going to real easy. And then it starts all over again with Page 2 (sigh). Is there no better way to get this data??

Edited by Guest

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