Last post Jun 10, 2012 01:57 AM by Decker Dong - MSFT
Jun 08, 2012 07:41 PM|Schwimms|LINK
This is just a general question, let's say I make an API call to google and google returns an XML document with multiple fields and lines of data. What is the best way to take that data and put it into a dataset?
Here is an example of my API call with control parameters passed into the API call:
& lat & "," & lng & "&radius=5000&keyword=" & Replace(searchvenuenametextbox, " ", "+") _
& "&sensor=false&key=" & googleapikey)
Jun 08, 2012 08:21 PM|RichardY|LINK
It's been a while but I think you would consume the xml with an XmlReader and them use the DataSet.ReadXml() method. Somthing like this:
XmlReader reader = XmlReader.Create("Url");
DateSet ds = new Dataset();
Jun 08, 2012 08:44 PM|Schwimms|LINK
Is there a way to filter on specific fields in the XML so it presents correctly? It seems to show just the 2 parent nodes and there is only junk data in there. I see the word "Status" and the data of "OK" and the word "PlaceSearchResponse_Id" and the data
Jun 10, 2012 01:57 AM|decker dong - msft|LINK
What is the best way to take that data and put it into a dataset?
Well……I've seen such cases many times and I've told you it just depends on whether your xml contents can be converted into DataSet/DataTable successfully or not——Not every xml file can be converted into a DataTable/DataSet。
Please refer my post at：http://forums.asp.net/p/1811549/5018019.aspx/1?Re+Fetch+XML+Clean+Up+Add+to+Dataset+in+VB