Hello I am new to XML but I am developing an app for mobile devices that tracks global stock prices. I pull this data from yahoo.finance.stocks which is a community table designed by somebody other than myslef. Up until a few weeks ago the table worked fine, now the company name for all stocks is NULL. Can anybody see why this would be the case in the code below?

Many thanks in advance

Bob

<table><meta><author>XXXXXXX</author>
<description>Yahoo Finance Stock Summary Information</description><sampleQuery>select * from {table} where symbol="yhoo"</sampleQuery></meta>
<bindings>
<select itemPath="" produces="XML">
<urls><url/></urls>
<inputs>
<key id="symbol" type="xs:string" paramType="variable" required="true"/></inputs>
<execute>
// pad string with leading char
String.prototype.pad = function (padchar, padlen) {
s = this
while (s.length < padlen) {
s = padchar + s;
}
return s;
}

String.prototype.trim = function () {
var str = this.replace(/^\s\s*/, ''),
ws = /\s/,
i = str.length;
while (ws.test(str.charAt(--i)));
return str.slice(0, i + 1);
}

function getQuoteInfo() {
// Get company name & market from Yahoo Quotes Summary page
var results = quoteQuery.results;
elements = results.*.length();
if (elements == 0)
return false;

stock.CompanyName = results.h1.text().toString().trim();
var marketSymbolStr = results.div.span.toString();
//var match = marketSymbolStr.match(/^[^:]+:\s+([^)]+)\)$/); matches stock symbol
var match = marketSymbolStr.match(/^\(([^:]+):/);
if (match != null) {
stock.CompanyName += <Market>{match[1]}</Market>;

}
return true;
}

function getHistoricalPrice() {
// Get the Historical Price Range
var results = historicalQuery.results;
elements = results.*.length();
if (elements < 6)
return false;
startMonth = String(parseInt(results.option[0].@value)+1).pad("0", 2);
startDay = results.input[0].@value.toString().pad("0", 2);
startYear = results.input[1].@value.toString();
endMonth = String(parseInt(results.option[1].@value)+1).pad("0", 2);
endDay = results.input[2].@value.toString().pad("0", 2);
endYear = results.input[3].@value.toString();

startDate = startYear + "-" + startMonth + "-" + startDay;
endDate = endYear + "-" + endMonth + "-" + endDay;

stock.appendChild(<start>{startDate}</start>);
stock.appendChild(<end>{endDate}</end>);
return true;
}

function getProfileInfo() {
// Get the Sector, Industry, Full Time Employees from Profile page
var results = profileQuery.results;
elements = results.*.length();
if (elements == 0)
return false;
for each (var tr in results.tr){
//Remove trailing colon, and strip whitespace
var property = tr.td[0].p.text()
.toString().slice(0, -1)
.replace(/\s+/g, "");
switch (property.toLowerCase()) {
case 'indexmembership':
continue;
break;
case 'fulltimeemployees':
//Strip commas
value = tr.td[1].*.text().toString().replace(/,/g, "");
break;
default:
//Convert whitespace to single space
value = tr.td[1].*.text().toString().replace(/\s+/g, " ");
break;
}
stock.appendChild(<{property}>{value}</{property}>);
}
return true;
}

// Queue the queries
var url = "http://finance.yahoo.com/q/pr?s="+symbol;
var profileQuery = y.query(
"select * from html " +
"where url=@url and " +
"xpath='//table[@class=\"yfnc_datamodoutline1\"]/tr/td/table/tr' " +
"limit 4",
{url:url});

var url = "http://finance.yahoo.com/q?s="+symbol;
var quoteQuery = y.query(
"select * from html " +
"where url=@url and " +
"xpath='" +
"//div[@id=\"yfi_investing_head\"]/h1 | " +
"//div[@class=\"yfi_quote_summary\"]/div[1]'" ,
{url:url});

var url = "http://finance.yahoo.com/q/hp?s="+symbol;
var historicalQuery = y.query(
"select * from html " +
"where url=@url and " +
"xpath='" +
"//option[@selected=\"selected\"] | " +
"//input[@maxlength=\"2\"] | " +
"//input[@maxlength=\"4\"]'",
{url:url});

var stock = <stock symbol={symbol}></stock>;

getQuoteInfo();
getHistoricalPrice();
getProfileInfo();

response.object = stock

</execute></select></bindings></table>