gofix for weekly.2012-01-27

This commit is contained in:
jim teeuwen 2012-01-27 11:51:02 +01:00
parent b5c33469fa
commit 6e76dc96aa
2 changed files with 3 additions and 3 deletions

View file

@ -45,7 +45,7 @@ func NewNode(tid byte) *Node {
// This wraps the standard xml.Unmarshal function and supplies this particular
// node as the content to be unmarshalled.
func (this *Node) Unmarshal(obj interface{}) error {
return xml.Unmarshal(bytes.NewBuffer(this.Bytes()), obj)
return xml.NewDecoder(bytes.NewBuffer(this.Bytes())).Decode(obj)
}
// Get node value as string