You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: unmarshal.go
    path of file: ./repos/corteza/server/vendor/github.com/russellhaering/goxmldsig/etreeutils
    
    the code of the file until where you have to start completion: package etreeutils

import (
	"encoding/xml"

	"github.com/beevik/etree"
)

// NSUnmarshalElement unmarshals the passed etree Element into the value pointed to by
// v using encoding/xml in the context of the passed NSContext. If v implements
// ElementKeeper, SetUnderlyingElement will be called on v with a reference to el.
func NS
    
func NSUnmarshalElement(ctx NSContext, el *etree.Element, v interface{}) error {
	detatched, err := NSDetatch(ctx, el)
	if err != nil {
		return err
	}

	doc := etree.NewDocument()
	doc.AddChild(detatched)
	data, err := doc.WriteToBytes()
	if err != nil {
		return err
	}

	err = xml.Unmarshal(data, v)
	if err != nil {
		return err
	}

	switch v := v.(type) {
	case ElementKeeper:
		v.SetUnderlyingElement(el)
	}

	return nil
}