Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi,

Is there anyone who know a good freeware with which I could convert XHTML tags and content to a XML file?

Thank

Not sure what you are asking. A valid XHTML is already XML.

  • Author

I know, but I want to extract some data from an XHTML source so I can import them in Filemaker.

Do you know how to import XML into Filemaker using a XSLT stylesheet?

  • Author

Can we do that?? If so, do you have a good tutorial?

Yes, we can and no, I don't. There are a few examples in the Extras folder next to your application, and more on FMI's site.

And of course there are a number of threads here, either in this or the Export section.

Edited by Guest

  • Author

I attached a source file example.

I want to extract the content of the rows where the tr tag and its attribute class="txt_general".

I just want to know where to start.

In this example, the primary key is 5176748. You can locate the right tag with the ID.

srcData.zip

You haven't answered my question. Do you have any experience with XSLT? I am asking this because I too need to know where to start... :P

  • Author

Not much...

I don't really know what you expect. I took a look at your document: although I was able to extract data from it using an external XSLT processor, Filemaker refuses to import it directly for some reason. I suspect it may because the encoding is declared incorrectly.

  • Author

What is the external XSLT processor you're using?

It's an OS X application called TestXSLT, and it has a choice of 4 processors: Sablotron, libxslt, Saxon and Xalan-J. Mind you, it doesn't do anything of itself - I had to write a stylesheet for it to run against your file.

  • Author

I guess I should learn how XSLT works.

Can't hurt - but I believe you're going to have problems with your source. It's not strict XHTML (doesn't even have an XML declaration), and as I said, I suspect it has other issues as well. If you need to to do this often, you should look for a better alternative.

  • Author

I had to modify the source because two tags weren't standard.

Maybe I'll do something in C# with regular expression to extract the data.

What exactly are you trying to accomplish here? Is this a process you need to repeat regularly?

  • Author

Yes, I need to extract some data from a search result. I will need to do this in a regular basis. There might as much as 200 rows to extract from the page.

I thought it would be easier using an XML+XSLT parser.

If you have any control over the server side, that would be the best place to make changes. Otherwise, you might be able to script the extraction in a web viewer, I think (you never said what exactly you need to extract, and I think there's only one record in your sample).

If external pre-processing is an option, I believe you could run the file against a XSLT stylesheet from the command line, or use a third-party app. (don't know what's available for Windows)

  • Author

I attached a file with multiple rows.

I want extract the data in the rows. Eg: Address, city, price, ...

This is an original source, there are two errors that make the file not XML compliant.

btw :P It's in french.

srcExample.txt

Please zip your file before attaching, so we can eliminate a possible cause of the encoding mismatch. The file says "charset=iso-8859-1", but it is really UTF-8.

  • Author

I know, but I have no control on the server side. Okay, I'll zip the file next time.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.