MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / NewDecoder

Function NewDecoder

server/webdav/internal/xml/xml.go:239–248  ·  view source on GitHub ↗

NewDecoder creates a new XML parser reading from r. If r does not implement io.ByteReader, NewDecoder will do its own buffering.

(r io.Reader)

Source from the content-addressed store, hash-verified

237// If r does not implement io.ByteReader, NewDecoder will
238// do its own buffering.
239func NewDecoder(r io.Reader) *Decoder {
240 d := &Decoder{
241 ns: make(map[string]string),
242 nextByte: -1,
243 line: 1,
244 Strict: true,
245 }
246 d.switchToReader(r)
247 return d
248}
249
250// Token returns the next XML token in the input stream.
251// At the end of the input stream, Token returns nil, io.EOF.

Callers 15

TestRawTokenFunction · 0.85
TestNonStrictRawTokenFunction · 0.85
TestRawTokenAltEncodingFunction · 0.85
TestNestedDirectivesFunction · 0.85
TestTokenFunction · 0.85
TestSyntaxFunction · 0.85
TestUnquotedAttrsFunction · 0.85
TestValuelessAttrsFunction · 0.85
TestSyntaxErrorLineNumFunction · 0.85
TestTrailingRawTokenFunction · 0.85
TestTrailingTokenFunction · 0.85

Calls 1

switchToReaderMethod · 0.95

Tested by 15

TestRawTokenFunction · 0.68
TestNonStrictRawTokenFunction · 0.68
TestRawTokenAltEncodingFunction · 0.68
TestNestedDirectivesFunction · 0.68
TestTokenFunction · 0.68
TestSyntaxFunction · 0.68
TestUnquotedAttrsFunction · 0.68
TestValuelessAttrsFunction · 0.68
TestSyntaxErrorLineNumFunction · 0.68
TestTrailingRawTokenFunction · 0.68
TestTrailingTokenFunction · 0.68