3 ms·
It's nowhere near as fascinating as some other stories here. But earlier this year I and a friend created an Android app for our school schedules. Initially we
by saticmotion 12y ago
It's nowhere near as fascinating as some other stories here. But earlier this year I and a friend created an Android app for our school schedules. Initially we thought it would be easy; "let's ask the schools devs for an API or something".
Turns out it's a basically a black box they've bought from an obscure company.
We then needed to parse the HTML tables by hand, which should be relatively straight-forward for simple tables. But then it turns out the tables are filled with rowspans, colspans and nested tables. It took me quite a while to create a decent algorithm, as I had never done anything similar before. But now we can parse all the HTML tables on that website and cache them in the app.
As I said, nothing impressive or fascinating, but I was still quite proud of my algorithm.
- Rondom 12y agoI have done something similar to transform legacy pre-2000-HTML pages to a mobile-friendly version via XSLT. I had multiline XPath-expressions and comments like "grey box on the top-right of product overview pages containing links like X, Y and Z" and the XPath expression was looking for things like a table with grey background that is an descendant of the table that comes after the comment "<!-- CONTENT STARTS HERE -->" and that is following-sibling of a form with name bla.