Shurik12
11-23-2006, 07:42 AM
Hi,
Being a novice in the web-programming on the whole and .NET 2.0 (C#)
in particular I'd like to ask the following
I need to automate a process of
1) finding (the most recent ) xml file on a http site
2) porting it to an Oracle database and saving a local copy
Everything seems to be fine with one 'but'. For testnig purposes
I've hardcoded the name of the file
...
XmlTextReader textReader = new XmlTextReader ("http://...TheNameOfTheFile.xml");
textReader.Read();
XmlDocument doc = new XmlDocument();
doc.Load(textReader);
//...
// etc
So the question itself, what the best way to proceed to find the latest avaiable file (see attachment) and pick it up.
Am I on the right way doing something similar too
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create
("http://....);
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
StreamReader streamReader = new StreamReader(webResponse.GetResponseStream(), Encoding.ASCII);
try
{
string outputString;
outputString = streamReader.ReadToEnd();
MessageBox.Show (outputString);
}
catch
{
... ;
}
streamReader.Close();
Does it boil down to parsing outputString ?
Thanks,
Shurik.
Being a novice in the web-programming on the whole and .NET 2.0 (C#)
in particular I'd like to ask the following
I need to automate a process of
1) finding (the most recent ) xml file on a http site
2) porting it to an Oracle database and saving a local copy
Everything seems to be fine with one 'but'. For testnig purposes
I've hardcoded the name of the file
...
XmlTextReader textReader = new XmlTextReader ("http://...TheNameOfTheFile.xml");
textReader.Read();
XmlDocument doc = new XmlDocument();
doc.Load(textReader);
//...
// etc
So the question itself, what the best way to proceed to find the latest avaiable file (see attachment) and pick it up.
Am I on the right way doing something similar too
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create
("http://....);
HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse();
StreamReader streamReader = new StreamReader(webResponse.GetResponseStream(), Encoding.ASCII);
try
{
string outputString;
outputString = streamReader.ReadToEnd();
MessageBox.Show (outputString);
}
catch
{
... ;
}
streamReader.Close();
Does it boil down to parsing outputString ?
Thanks,
Shurik.