Update readme
Swift package to convert a HTML table into an array of dictionaries.
GIVEN I have the following table
WHEN I use Slab
let array: [[String: String]] = try Slab().convert(htmlString)
THEN I see an array of dictionaries
[ ["A": "1", "B": "2"], ["A": "3", "B": "4"] ]
[ ["A": "1", "B": "1"], ["A": "3", "B": "4"] ]
[ ["A": "1", "B": "2"], ["A": "4", "B": "2"] ]
[ ["A\nA": "1", "B": "2"], ["A\nA": "3\n3", "B": "2"] ]
Prior to row data being entered, you have the opportunity to modify the SwiftSoup.Element.
SwiftSoup.Element
Configuration(modify: { element, row, column in try element.select("sup").remove() return element })
[ ["A": "1", "B": "2"] ]
<td></td>
String
Add the following to your project:
https://github.com/ptrkstr/Slab
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
Swift package to convert a HTML table into an array of dictionaries.
Example
GIVEN I have the following table
WHEN I use Slab
THEN I see an array of dictionaries
Features
Colspan Support
Rowspan Support
Linebreak Support
A
3
Modification
Prior to row data being entered, you have the opportunity to modify the
SwiftSoup.Element
.Notes
<td></td>
is converted into an emptyString
Installation
SPM
Add the following to your project: