How can I get an HTML file from file system and parse specific elements from it.
For example, given the html snippet below, how can I extract the table content and rende
I would recommend using this library: react-native-htmlviewer. It takes html and renders it as native views. You can also customize the way elements get rendered.
// only render the nodes in your html
function renderNode(node, index, siblings, parent, defaultRenderer) {
if (node.name !== 'table'){
return (
{defaultRenderer(node.children, parent)}
)l
}
}
// your html
const htmlContent = ``;
class App extends React.Component {
render() {
return (
);
}
}
- 热议问题