February 12, 200718 yr Greetings, Google does not directly support xml results any longer, and I've attempted in vain for many hours to parse Yahoo local data into Filemaker XML with XSL. Does anyone know of a solid XML data provider whom I can querry with business names and get reasonable XML address, phone, etc results? Has anyone had any luck trying to parse the Yahoo local results (I get one error after another from their XML results).
February 12, 200718 yr Author Also, in the same vain, I've been attempting to use Yahoo Local which outputs to XML, but they've got some interesting namespace stuff going on in the results that I can't seem to eliminate from my results: any ideas on how to transform this to simply ""? Of course, I manually remove it, and still have other issues further down the tree, but I can't seem to cross the first bridge!
February 12, 200718 yr Please repost your xml code inside "code" tags, which are like html tags, but with brackets [] instead of (is this documented somewhere?). We don't need all the xml (if it's huge), but enough to see and process. It ends up looking like this, ie., all the tags and spacing are preserved:
February 12, 200718 yr Basically what you have to add is define a "namespace prefix", so you can identify the Yahoo result data to extract. Then you need to remove it again, because FileMaker uses its own namespace, and doesn't want no stinking Yahoo namespace in its fmpxmlresult :-] Fortunately the tools to do this are fairly simple in xsl. You just add a prefix (and it can be whatever you want, but short), in the element like this (I'm using "yah"): xmlns:yah="urn:yahoo:lcl" Then, near the end of the tag, you remove it from the results: exclude-result-prefixes="yah" <?xml version="1.0" encoding="utf-8"?> xmlns:yah="urn:yahoo:lcl" version="1.0" exclude-result-prefixes="yah"> 0 0 Notice that I had to use: select="yah:ResultSet" to target the Yahoo element. But I didn't have to use it for the "attributes", as they're contained by the element. Edited February 12, 200718 yr by Guest yah
February 12, 200718 yr Author Fenton, You are brilliant! I attempted this before, but I didn't understand that I only needed to exclude the name space once and all child tags would be excluded. It parsed right up. Thanks!
Create an account or sign in to comment