tags:

views:

37

answers:

1

Problem

I have a YQL query result that I'm trying to get converted and sort into a clean XML file.

Background

Being the pains that they are, information from the World Cup isn't freely available in an easy to reuse format.

So, after a bit of finessing with YQL I have managed to liberate the required table rows which contain the data I'm after.

The YQL query can be viewed at: http://query.yahooapis.com/v1/public/yql/ravingbeefsteak/worldcup2010groupliberator?diagnostics=true

The result of this is a whole bunch of table rows (view source from within your browser to see this).

I'd like to now take these resulting table rows, and convert them into an XML file, and being an absolute n00b I don't know where to start or what to look for.

The file could also use some structure to it, so part of working this out will involve creating that XML structure which I envision would look something like:

<teams>
  <team>
    <name>X</name>
    <webpage>X</webpage>
    <flagsrc>X</flagsrc>
    ...
  </team>
</teams>

I'm also needing to do a find and replace on the data (to what would become the data inside the XML team/webpage & team/flagsrc elements) to prepend addition data to these fields without manual intervention.

If anyone can point me in the right direction of what I need to be doing to make my needs a reality it would be greatly appreciated.

+1  A: 

Am I missing something? The document linked to is already an XML document.

If you want to transform the data to another XML format, look at XSLT. I'd give more information but you did not indicate what platform you are on.

Oded
Nope, I just wasn't detailed enough in my question, and providing the platform would have been helpful (slaps head). Working on ASP VB w/IIS6.If you take a look at the source view of the provided link, you'll see its just some HTML code (specifically a list of table rows) that is being output. This is what I'm trying to make into XML to make it a much easier to reuse dataset.
thewinchester
@thewinchester - to be honest, my answer does not change even after your updates. I suggest you read about XSLT, as this is a technology to transform one XML format to another in the way you describe.
Oded