WriteToString serializes this document into a string.
()
| 474 | |
| 475 | // WriteToString serializes this document into a string. |
| 476 | func (d *Document) WriteToString() (s string, err error) { |
| 477 | var b []byte |
| 478 | if b, err = d.WriteToBytes(); err != nil { |
| 479 | return |
| 480 | } |
| 481 | return string(b), nil |
| 482 | } |
| 483 | |
| 484 | // Indent modifies the document's element tree by inserting character data |
| 485 | // tokens containing newlines and spaces for indentation. The amount of |