【发布时间】:2016-10-20 00:27:54
【问题描述】:
我收到如下 Web 服务响应:
<text><span class="TitleServiceChange" >Service Change</span>
<span class="DateStyle">
&nbsp;Posted:&nbsp;10/19/2016&nbsp; 8:04PM
</span>
<br/>
<br/>
<P><STRONG>B103-Ltd</STRONG> and <STRONG>BM2 </STRONG>buses are detoured due to paving on Avenue M between Remsen Av and E. 95 St. </P>
<P>Detour is as follows: </P>
<P><STRONG>Eastboun</STRONG>d: Via Avenue M. right on Remsen Av, left on Avenue N, left on Rockaway Pkwy, right on Avenue M and regular route. </P>
<P><STRONG>Westbound</STRONG>: Via Avenue M, left on E. 95 St, right on Avenue N, right on E. 85 St, right on Remsen Av, left on Avenue M, and regular route. </P>
<P>All corresponding stops will be made along the detoured route. </P>
<P>Allow additional travel time. </P>
<br/>
<br/></text>
我不太确定这个表示法是什么,但似乎 HTML 标记的 已经与其他 HTML 转换了 < 和 >(小于和大于)。有没有办法清理这个响应,所以我可以得到纯文本?
【问题讨论】:
-
这不是来自网络服务的典型响应。通常你会得到 XML 或 JSON。
-
MTA api 非常不典型......
标签: javascript html xml web-services rest