PowerTip: Validate XML Document with PowerShell

Doctor Scripto

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.

0 comments

Discussion is closed.

Feedback usabilla icon