We’ll start with the following listing, where we’ve provided the basic shell for the XML file.
<?xml version="1.0" encoding="utf-8" ?> <Configuration> <ViewDefinitions> </ViewDefinitions> </Configuration>
We’ve saved this as C:\Test.format.ps1xml. We suggest saving your view files to a short path—like C:\, or C:\Test, or something else—while you’re working on the file. You’ll be typing that path a lot, so keeping it short saves you time and effort. Note that the contents of our file are already showing good XML formatting practices: We’re indenting each nested set of tags and making sure that each tag is closed at the proper level.
For example, the outermost tag pair ...