sxd_html_table
Provide features related to HTML tables
There are some complexities to deal with when dealing with HTML tables.
- There are colspans and rowspans, and the number of rows and columns is indeterminate.
- There are th and td, and the type of cell requires attention.
This library hides these complexities and makes it easy to deal with the structure of the table. For example, you can convert an HTML table tag to a CSV file.
Usage
use Table;
let html = r#"
<table>
<tr>
<th>header1</th>
<th>header2</th>
</tr>
<tr>
<td>data1</td>
<td>data2</td>
</tr>
</table>
"#;
let table = extract_table_texts_from_document.unwrap;
let csv = table.to_csv.unwrap;
assert_eq!;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.