Version 1
[yaffs-website] / vendor / masterminds / html5 / src / HTML5 / Serializer / README.md
1 # The Serializer (Writer) Model
2
3 The serializer roughly follows sections _8.1 Writing HTML documents_ and section
4 _8.3 Serializing HTML fragments_ by converting DOMDocument, DOMDocumentFragment,
5 and DOMNodeList into HTML5.
6
7        [ HTML5 ]   // Interface for saving.
8           ||
9      [ Traverser ]   // Walk the DOM
10           ||
11        [ Rules ]     // Convert DOM elements into strings.
12           ||
13        [ HTML5 ]     // HTML5 document or fragment in text.
14
15
16 ## HTML5 Class
17
18 Provides the top level interface for saving.
19
20 ## The Traverser
21
22 Walks the DOM finding each element and passing it off to the output rules to
23 convert to HTML5.
24
25 ## Output Rules
26
27 The output rules are defined in the RulesInterface which can have multiple
28 implementations. Currently, the OutputRules is the default implementation that
29 converts a DOM as is into HTML5.
30
31 ## HTML5 String
32
33 The output of the process it HTML5 as a string or saved to a file.