KishNovoice
asked on
I need to retrieve information in xml from multiple websites using POST/GET methods as required
I need to retrieve information from multiple websites accordingly and save information into sql server. Based on carriers, we need to retrieve information from an xml/webservice/as parametrized string using POST/GET methods.
I am a beginner and would like to know what would be the best approach..
Overview:
I will be working with a third party application which has a "get least freight" button and once clicked we need to get the least possible freight from the list of carries.
I am a beginner and would like to know what would be the best approach..
Overview:
I will be working with a third party application which has a "get least freight" button and once clicked we need to get the least possible freight from the list of carries.
ASKER
Thanks for the suggestion TheLearnedOne. So do you suggest me following this path..
click triggers a event -> function gets the input like To and From zip codes -> queries each website url one after other -> based on the method, validates the response and gets the Rate and Days information and Save it to database.
My question would also be how would I convert the document to XMLformat so that I could read the nodes from HttpWebResponse..
Thanks a lot..
Kish
click triggers a event -> function gets the input like To and From zip codes -> queries each website url one after other -> based on the method, validates the response and gets the Rate and Days information and Save it to database.
My question would also be how would I convert the document to XMLformat so that I could read the nodes from HttpWebResponse..
Thanks a lot..
Kish
Kish,
It is hard to know what I am really going to suggest. Like I said before, that depends on what type of web site/web service you are pulling information from. If you can provide a little more detail, I might be able to suggest a "better" course of action.
Bob
It is hard to know what I am really going to suggest. Like I said before, that depends on what type of web site/web service you are pulling information from. If you can provide a little more detail, I might be able to suggest a "better" course of action.
Bob
Creating an XmlDocument is pretty easy, and can take different forms:
Simple example:
using System.Xml;
XmlDocument document = new XmlDocument();
document.Load(fileName);
foreach (XmlNode node in document.SelectNodes("//no de")
{
string name = node.Name;
string innerText = node.InnerText;
}
The SelectNodes method, along with SelectSingleNode, takes a valid XPath expression, so you could get the full power of XPath to parse an XML document.
Simple example:
using System.Xml;
XmlDocument document = new XmlDocument();
document.Load(fileName);
foreach (XmlNode node in document.SelectNodes("//no
{
string name = node.Name;
string innerText = node.InnerText;
}
The SelectNodes method, along with SelectSingleNode, takes a valid XPath expression, so you could get the full power of XPath to parse an XML document.
XPath tutorial:
http://www.w3schools.com/Xpath/
http://www.w3schools.com/Xpath/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks LearnedOne you answered my question..
I believe that you need to look into creating and using web service references, parsing XML, and using the System.Net.HttpWebRequest,
The details for your requirement are going to come in time.