MCPcopy Create free account
hub / github.com/beevik/etree / WriteToString

Method WriteToString

etree.go:470–476  ·  view source on GitHub ↗

WriteToString serializes this document into a string.

()

Source from the content-addressed store, hash-verified

468
469// WriteToString serializes this document into a string.
470func (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

Callers 15

TestDocumentFunction · 0.95
TestEscapeCodesFunction · 0.95
TestCanonicalFunction · 0.95
TestAddChildFunction · 0.95
TestSetRootFunction · 0.95
TestCharDataFunction · 0.95
TestIndentSimpleFunction · 0.95
TestIndentWithSettingsFunction · 0.95
TestContinuationsFunction · 0.95

Calls 1

WriteToBytesMethod · 0.95

Tested by 15

TestDocumentFunction · 0.76
TestEscapeCodesFunction · 0.76
TestCanonicalFunction · 0.76
TestAddChildFunction · 0.76
TestSetRootFunction · 0.76
TestCharDataFunction · 0.76
TestIndentSimpleFunction · 0.76
TestIndentWithSettingsFunction · 0.76
TestContinuationsFunction · 0.76