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

URL to import XML data - no errors but no data imported?


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

Recommended Posts

Posted

I am trying to import some stock quotes from a webservice into a table using XML. I've created a table with the same structure as the data being imported and created an XSL stylesheet (that does not give any errors), but when I import it, I get no data imported and no errors? Here is the URL that I am using to import the XML data from.

http://www.webservicex.net/stockquote.asmx/GetQuote?symbol=MSFT

This should return the Microsoft stock quote data in XML format.

If you need to see the XSL stylesheet, I'll be happy to post.

Posted

I don't think the server provides the expected response: if you look at the page source you'll see that almost all < > characters are escaped.

---

P.S. This seems to be a follow up on:

http://fmforums.com/forum/showtopic.php?tid/216287/

and should have been posted there.

Posted (edited)

What they've done is convert the "<" and ">" characters what should be XML into their HTML entities, "<" & ">" Then stuck it all in as the text of the single element .

Which makes "legal" XML. Clever really, but pretty useless. What you could do is translate those back into "<" & ">". But when and how is the question.

To import a cleaned version into FileMaker it would need to be an external file. So, the choices are:

1. a. Fix in FileMaker, using Substitute. Export, either via Export Field Contents (utf-16), or as a 1 field, 1 record Export (choice of encoding, utf-8, etc.).

b. Import cleaned file.

2. Don't fix it. Use FileMaker Text functions to parse out the data. Since you have reliable separators (tho weird), and only a field things to get, this might not be that hard to do.

3. a. Use a more extensible tool, such as AppleScript and/or 'curl' command line (cross-platform) to get the HTML, "decode" it, and write as a proper XML file.

b. Import clean file.

Edited by Guest
It is XML, just funky
Posted (edited)

Oh, it IS XML data - that's why you don't get an error. The problem is that the entire response is contained in a single element as gibberish that cannot be parsed by XML parser. You could import it as is into a text field and parse it yourself - but I think it would be easier to find another provider (or write to the folks at webservicex.net and ask them to fix it).

---

I see Fenton got to it while I was playing...

Edited by Guest

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