- \HTML5_Parser
class (none) \ HTML5_Parser
Outwards facing interface for HTML5.
Method Summary
Name | Description |
---|---|
parse($text, $builder = null) | Parses a full HTML document. |
parseFragment($text, $context = null, $builder = null) | Parses an HTML fragment. |
public static function parse($text, $builder = null)
Parses a full HTML document.
- Parameters:
$text
- HTML text to parse$builder
- Custom builder implementation- Defaults:
builder
=null
- Returns:
Parsed HTML as DOMDocument
public static function parseFragment($text, $context = null, $builder = null)
Parses an HTML fragment.
- Parameters:
$text
- HTML text to parse$context
- String name of context element to pretend parsing is in.$builder
- Custom builder implementation- Defaults:
context
=null
builder
=null
- Returns:
Parsed HTML as DOMDocument