diff options
Diffstat (limited to 'vendor/github.com/mitchellh/packer/builder/parallels/common/driver_9.go')
-rw-r--r-- | vendor/github.com/mitchellh/packer/builder/parallels/common/driver_9.go | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/vendor/github.com/mitchellh/packer/builder/parallels/common/driver_9.go b/vendor/github.com/mitchellh/packer/builder/parallels/common/driver_9.go index e0e82fb6..b6757d89 100644 --- a/vendor/github.com/mitchellh/packer/builder/parallels/common/driver_9.go +++ b/vendor/github.com/mitchellh/packer/builder/parallels/common/driver_9.go @@ -13,7 +13,8 @@ import ( "strings" "time" - "gopkg.in/xmlpath.v2" + "github.com/ChrisTrenkamp/goxpath" + "github.com/ChrisTrenkamp/goxpath/tree/xmltree" ) // Parallels9Driver is a base type for Parallels builders. @@ -78,13 +79,19 @@ func getConfigValueFromXpath(path, xpath string) (string, error) { if err != nil { return "", err } - xpathComp := xmlpath.MustCompile(xpath) - root, err := xmlpath.Parse(file) + + doc, err := xmltree.ParseXML(file) + if err != nil { + return "", err + } + + xpExec := goxpath.MustParse(xpath) + node, err := xpExec.Exec(doc) if err != nil { return "", err } - value, _ := xpathComp.String(root) - return value, nil + + return node.String(), nil } // Finds an application bundle by identifier (for "darwin" platform only) |