In dart parse HTML string in DOM
In the dart
I want to parse the string " <!DOCTYPE HTMT><html><head></head><body>....</body></html>" in the DOM so that I can manipulate the element in the generated DOM. I know that in jQuery there is $ .parseHTML to handle this. But I can't find anything like this in a dart. Thanks.
(I tried html2lib, but the output cannot use query(".classname")for selection.)
, HTML:
new Element.html("YOUR HTML STRING HERE");
NodeValidator, , :
NodeValidator nodeValidator = new NodeValidatorBuilder()
..allowTextElements();
// ..allowHtml5()
// ..allowElement('Button', attributes: ['ng-disabled']);
new Element.html("YOUR HTML STRING HERE", validator: nodeValidator);
, , "element/attribute xxx removed from...", - NodeValidator.