Write writes xml to given writer.
(writer io.Writer, self bool)
| 359 | |
| 360 | // Write writes xml to given writer. |
| 361 | func (n *Node) Write(writer io.Writer, self bool) error { |
| 362 | if self { |
| 363 | return n.WriteWithOptions(writer, WithOutputSelf()) |
| 364 | } |
| 365 | return n.WriteWithOptions(writer) |
| 366 | } |
| 367 | |
| 368 | // WriteWithOptions writes xml with given options to given writer. |
| 369 | func (n *Node) WriteWithOptions(writer io.Writer, opts ...OutputOption) (err error) { |