June 10th, 2014

PowerTip: Validate XML Document with PowerShell

Doctor Scripto
Scripter

Summary: Learn to use Windows PowerShell to validate that an XML document is well formed.

Hey, Scripting Guy! Question How can I use Windows PowerShell to test that anXML document is well formed?

Hey, Scripting Guy! Answer Use the Test-XML cmdlet from the PSCX:

test-xml C:\fso\users.xml

Note  PSCX is a community-produced project that is available for free from CodePlex.
I have written quite a bit about downloading, installing, and using this great resource.
For more information, see this collection of Hey, Scripting Guy! Blog posts.

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback