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