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

Method WriteToString

etree.go:477–483  ·  view source on GitHub ↗

WriteToString serializes this document into a string.

()

Source from the content-addressed store, hash-verified

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

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