WriteTo writes the XML representation of the end element to the provided writer.
(w TokenWriter)
| 82 | |
| 83 | // WriteTo writes the XML representation of the end element to the provided writer. |
| 84 | func (e *EndElement) WriteTo(w TokenWriter) error { |
| 85 | if _, err := w.WriteString("</"); err != nil { |
| 86 | return err |
| 87 | } |
| 88 | if _, err := w.WriteString(e.Name.String()); err != nil { |
| 89 | return err |
| 90 | } |
| 91 | if err := w.WriteByte('>'); err != nil { |
| 92 | return err |
| 93 | } |
| 94 | return nil |
| 95 | } |
| 96 | |
| 97 | // Directive represents a DOCTYPE directive token. |
| 98 | // When obtained from [Decoder], the bytes in the Data field are actual only |