August 20, 201015 yr 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.
August 21, 201015 yr 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.
August 21, 201015 yr Author So are you saying that the response is not really XML data? Is there any way to fix this so I can get the data?
August 21, 201015 yr 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 August 21, 201015 yr by Guest It is XML, just funky
August 21, 201015 yr 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 August 21, 201015 yr by Guest
Create an account or sign in to comment