I’m working on a project for the boss (wife) which will provide local tide information.
The data comes from the UK’s Hydrographic website but they don’t provide an API so I’m currently extracting the information using lots of string.IndefOf etc. Although it’s working and I am able to extract 7 days of data and associated graphics I was wondering if there’s a more elegant solution to parsing HTML pages?
@ Sprigo - Another thing to think about is maintainability. If this is a project that will be deployed for longer than a few weeks or months, then it might be worth building a web API wrapper around the parsing code, and have your device call that, rather than do the parsing directly.
That way, if/when the format of the page changes, you can fix the parsing in the API, rather than having to fish out and redeploy to your device.
An ASP.NET Web API on the free tier of Azure Web Apps would work well for something like that.