Solved

C# - Extracting lat / long from http page source

Posted on 2013-11-07
2
197 Views
Last Modified: 2013-11-11
Hi,

Assuming I had the source code of this page in a string.

https://maps.google.com.au/maps?f=q&hl=en&geocode=&q=3002+australia&output=js

What is the best way to extract the Lat/Long coordinates out of this part -
{center:{lat:-37.816144000000001,lng:144.980459}

Open in new window

into two seperate variables?

Thanks for your help
0
Comment
Question by:mhdi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
ID: 39633318
I'd take a look at using the HTML Agility Pack (http://htmlagilitypack.codeplex.com) to parse the HTML and extract the values you're interested in.
0
 

Author Comment

by:mhdi
ID: 39640521
Would it be possible/easier to use Regex?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question