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

Method WriteToString

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

WriteToString serializes this document into a string.

()

Source from the content-addressed store, hash-verified

474
475// WriteToString serializes this document into a string.
476func (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

Callers 15

TestDocumentFunction · 0.95
TestEscapeCodesFunction · 0.95
TestSanitizeCDataFunction · 0.95
TestSanitizeCommentFunction · 0.95
TestSanitizeDirectiveFunction · 0.95
TestSanitizeProcInstFunction · 0.95
TestFuzzInjectionFunction · 0.95
TestCanonicalFunction · 0.95
TestAddChildFunction · 0.95
TestSetRootFunction · 0.95
TestCharDataFunction · 0.95

Calls 1

WriteToBytesMethod · 0.95

Tested by 15

TestDocumentFunction · 0.76
TestEscapeCodesFunction · 0.76
TestSanitizeCDataFunction · 0.76
TestSanitizeCommentFunction · 0.76
TestSanitizeDirectiveFunction · 0.76
TestSanitizeProcInstFunction · 0.76
TestFuzzInjectionFunction · 0.76
TestCanonicalFunction · 0.76
TestAddChildFunction · 0.76
TestSetRootFunction · 0.76
TestCharDataFunction · 0.76