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