Exemplo n.º 1
0
func (elm *Response) Decode(d *xmlencoder.Decoder, tag *xml.StartElement) error {
	var err error
	var bdata []byte
	if bdata, err = d.Bytes(); err != nil {
		return err
	}
	elm.Data = bdata
	return err
}
Exemplo n.º 2
0
func (elm *Auth) Decode(d *xmlencoder.Decoder, tag *xml.StartElement) error {
	var err error
	for _, x := range tag.Attr {
		switch {
		case x.Name.Space == "" && x.Name.Local == "mechanism":
			elm.Mechanism = xmlencoder.Copystring(x.Value)
		}
	}
	var bdata []byte
	if bdata, err = d.Bytes(); err != nil {
		return err
	}
	elm.Data = bdata
	return err
}