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: xml_templated_match.go
    path of file: ./repos/hoverfly/core/matching/matchers
    
    the code of the file until where you have to start completion: package matchers

import (
	"regexp"

	"github.com/beevik/etree"
)

var XmlTemplated = "xmltemplated"

var ignoreExpr = regexp.MustCompile("^\\s*{{\\s*ignore\\s*}}\\s*$")
var regExpr = regexp.MustCompile("^\\s*{{\\s*regex:(.*)}}\\s*$")

func XmlTemplatedMatch(match interface{}, toMat
    
func XmlTemplatedMatch(match interface{}, toMatch string) bool {
	matchString, ok := match.(string)
	if !ok {
		return false
	}

	// parse xml in mock data into dom tree
	expected := etree.NewDocument()
	if err := expected.ReadFromString(matchString); err != nil {
		return false
	}

	// parse xml in actual request body into dom tree
	actual := etree.NewDocument()
	if err := actual.ReadFromString(toMatch); err != nil {
		return false
	}

	// tree matching
	return compareTree(expected.Root(), actual.Root())
}