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..

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.
Who is Participating?
Bob LearnedConnect With a Mentor Commented:
You can also create an XmlDocument instance, and load the document from a string:

Bob LearnedCommented:
Wow, it sounds like you are going to have fun, since that is not really an easy process, and you will have a lot to learn.  As with anything like this, you gotta start somewhere.  This appears to be a mix of different technologies, and deciding on the "best" course of action is difficult without knowing what is involved.

I believe that you need to look into creating and using web service references, parsing XML, and using the System.Net.HttpWebRequest, since the System.Net.WebClient is just a wrapper for an HttpWebRequest, and is only a subset of the HttpWebRequest class.  

The details for your requirement are going to come in time.
KishNovoiceAuthor Commented:
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..


Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Bob LearnedCommented:

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 LearnedCommented:
Creating an XmlDocument is pretty easy, and can take different forms:

Simple example:

using System.Xml;

XmlDocument document = new XmlDocument();

foreach (XmlNode node in document.SelectNodes("//node")
    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.
Bob LearnedCommented:
KishNovoiceAuthor Commented:
Thanks LearnedOne you answered my question..
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.