我正在使用谷歌方向 api 在我的地图视图中显示地图,它给了我 HTML 方向字符串,其中包含 HTML 标记。
现在我想以纯文本形式显示该字符串我该怎么做。我的字符串在这里:
Head <b>southwest</b> toward <b>GH Rd</b>
Exit the roundabout onto <b>GH Rd</b><div style="font-size:0.9em">Go through 1 roundabout</div>
At the roundabout, take the <b>1st</b> exit onto <b>Road Number 2</b><div style="font-size:0.9em">Pass by myonlinesearch.blogspot.com (on the left in 600 m)</div>
At the roundabout, take the <b>3rd</b> exit onto <b>CH Rd</b>
At <b>Indroda Cir</b>, take the <b>2nd</b> exit onto <b>Gandhinagar Ahmedabad Rd/SH 71</b><div style="font-size:0.9em">Continue to follow Gandhinagar Ahmedabad Rd</div><div style="font-size:0.9em">Go through 1 roundabout</div>
At the roundabout, take the <b>1st</b> exit onto <b>Sardar Patel Ring Rd</b>
At <b>Ranasan Cir</b>, take the <b>3rd</b> exit onto <b>NH 8</b><div style="font-size:0.9em">Pass by Galaxy Restaurant (on the left in 4.3 km)</div>
Turn <b>left</b> onto <b>Galaxy Rd</b><div style="font-size:0.9em">Pass by Shiv Shakti Food Fort (on the left)</div>
Turn <b>left</b> onto <b>NH 59</b>
Turn <b>right</b><div style="font-size:0.9em">Go through 1 roundabout</div>
Turn <b>right</b>
Turn <b>left</b><div style="font-size:0.9em">Destination will be on the right</div>