Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • The script has an error. It has no closing brace for the function. Commented Jan 18, 2010 at 8:08
  • The $reader should be closed after the while-loop. Otherwise you won't be able to edit the file until the Finalizer-saftey-net kicks in. Commented Sep 1, 2010 at 11:11
  • This doesn't seem to work: PS D:\projects\svcs> dir *.xml | Test-Xml The term 'Test-Xml' is not recognized as the name of a cmdlet, function, script file, or operable program.
    – Chloe
    Commented Jul 6, 2012 at 15:52
  • Even with no arguments, or bad arguments, it doesn't do anything. PS D:\projects\svcs> .\Test-Xml.ps1 PS D:\projects\svcs>
    – Chloe
    Commented Jul 6, 2012 at 15:53
  • This doesn't work; add_validationeventhandler will callback with errors, but the $failCount does not accumulate
    – eoleary
    Commented Oct 7, 2022 at 18:00