writeChildrenTo writes all child tokens of the node to the provided writer.
(w TokenWriter)
| 164 | |
| 165 | // writeChildrenTo writes all child tokens of the node to the provided writer. |
| 166 | func (n *Node) writeChildrenTo(w TokenWriter) error { |
| 167 | for _, child := range n.Children { |
| 168 | if err := child.WriteTo(w); err != nil { |
| 169 | return err |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | return nil |
| 174 | } |
| 175 | |
| 176 | // replaceEntities replaces XML entities in the node |
| 177 | // according to the provided entity map. |