internal: add NewPropfindResponse helper

This commit is contained in:
Simon Ser
2020-01-17 14:40:29 +01:00
parent e2da5769f5
commit 7cb302246b
4 changed files with 105 additions and 98 deletions

View File

@@ -89,6 +89,13 @@ func (val *RawXMLValue) Decode(v interface{}) error {
return xml.NewTokenDecoder(val.TokenReader()).Decode(&v)
}
func (val *RawXMLValue) XMLName() (name xml.Name, ok bool) {
if start, ok := val.tok.(xml.StartElement); ok {
return start.Name, true
}
return xml.Name{}, false
}
// TokenReader returns a stream of tokens for the XML value.
func (val *RawXMLValue) TokenReader() xml.TokenReader {
if val.out != nil {