Hello,
I am doing some html parsing, hoping to do some modification to it, before sending it to native.newWebView().
What are some of the efficient ways to parse the below html strings into key value pairs?
Example (1),
<img border=“0” style=“max-width:100%” src=“https://www.brookings.edu/wp-content/uploads/2018/07/trump_putin_helsinki006.jpg?w=248” width=“1200” height=“800” />
into,
pair = {
border = “0”,
style = “max-width:100%”,
src = “https://www.brookings.edu/wp-content/uploads/2018/07/trump_putin_helsinki006.jpg?w=248”,
width = “1200”,
height = “800”,
}
Example (2),
<a href="#page-content" class=“screen-reader-shortcut”>Skip to main content</a>
into,
pair = {
href = “#page-content”,
class = “screen-reader-shortcut”,
text = “Skip to main content”,
}
Many thanks for your help.
Regards, Luan