You can do this as

```
$nuspec = [xml](get-content $NuSpecPath)
```

and make it a little cleaner.