Jump to content

XML Source Suggestions


Roy Osborn
 Share

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

Recommended Posts

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).

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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:


Link to comment
Share on other sites

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 by Guest
yah
Link to comment
Share on other sites

This topic is 5707 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
 Share

×
×
  • Create New...

Important Information

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