Google Directions API -- get XML response without HTML markup
I am developing an Android app and using Google Maps and Directions API. I was able to successfully get directions in XML for all supported modes. However, they all come back with HTML markup. Does anyone know if there is a way to omit the markup when making a request, so that I don't have to remove it locally in the app? (Example: 1. "Turn right on Broad St." and so on, is what I currently receive. But of course, the word is not bol开发者_如何学Pythond, but you can actually see the tags). Thank you.
This turned out to be pretty easy to do with RegEx:
String directions = htmlDirections.replaceAll("\\<.*?\\>", "");
精彩评论