Kindly donated by Brett from
www.solentive.com (use freely without warranty!)
This basically writes out the prices for AUD and USD from your sample feed to a page in
ASP.NETusing System.Data;
using System.IO;
using System.Xml;
protected void ReadPriceFile()
{
String URLString="
http://xml.dgcsc.org/samples/GoldBE.xml";
XmlTextReader reader = new XmlTextReader(URLString);
DataSet ds = new DataSet();
ds.ReadXml(reader);
double troyOzGrams = 31.1034768;
Response.Write(ds.Tables["AUD"].Rows[0][0].ToString() + " == $" + ds.Tables["AUD"].Rows[0][1] + " AUD Per Gram");
Response.Write("<BR/>");
Response.Write(ds.Tables["USD"].Rows[0][0].ToString() + " == $" + ds.Tables["USD"].Rows[0][1] + " USD Per Gram");
Response.Write("<BR/>");
Response.Write(ds.Tables["AUD"].Rows[0][0].ToString() + " == $" + (double.Parse(ds.Tables["AUD"].Rows[0][1].ToString())*troyOzGrams).ToString("##.##") + " AUD Per Oz");
Response.Write("<BR/>");
Response.Write(ds.Tables["USD"].Rows[0][0].ToString() + " == $" + (double.Parse(ds.Tables["USD"].Rows[0][1].ToString()) * troyOzGrams).ToString("##.##") + " USD Per Oz");
//foreach (DataRow row in ds.Tables[1].Rows)
//{
// Response.Write(row[0].ToString());
//}
}