HTML5Lib
Categories
Component ID
2808395
Component name
HTML5Lib
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
304
Component created
Component changed
Component body
This module provides bridge between html5lib library and Drupal, so that features of html5lib can be used in Drupal.
For using this module, just copy the HTML5 folder from HTML5Lib Library and put it in sites/all/libraries folder and rename HTML5 folder to html5lib.
After this enable the module.
How to use this Module:
You can use Library function to traverse html, like below.
HTML5_Parser::parse($text)
$text : HTML to parse
return : DOMDocument of parsed document
HTML5_Parser::parseFragment($text, $context)
$text : HTML to parse
$context : String name of context element
return : DOMDocument of parsed document
