【发布时间】:2016-11-15 14:02:38
【问题描述】:
如何从文件系统中获取 HTML 文件并从中解析特定元素。
例如,给定下面的html sn-p,如何提取表格内容并渲染?
<html>
<div>
<h1>header</h1>
<table id="a" border="1">
<th>Number</th>
<th>content A</th>
<th>contetn A</th>
<th>content A</th>
<tr>
<td>1</td>
<td>a</td>
<td>a</td>
<td>a</td>
</tr>
<th>Number</th>
<th>content B</th>
<th>content B</th>
<th>content B</th>
<tr>
<td>1</td>
<td>b</td>
<td>b</td>
<td>b</td>
</tr>
</table>
</div>
<br>
<footer>footer</footer>
</html>
【问题讨论】:
标签: javascript html react-native html-parsing