Some common XML Utils I created because it was useful in my daily job and to get some Powershell fun as well.
You install by using: PowerShellGallery
Install-Module -Name "HumanTechSolutions.PowerShell.XmlUtils"See more at: https://www.powershellgallery.com/packages/HumanTechSolutions.PowerShell.XmlUtils/1.0
If you just want to import it for "temporary" use, you can do it by using:
HumanTechSolutions.PowerShell.XmlUtils-Import.ps1Which is provided with the module.
I am including Pester tests in the file: HumanTechSolutions.PowerShell.XmlUtils.tests.ps1 You can run it by doing:
Invoke-Pester ".\HumanTechSolutions.PowerShell.XmlUtils.tests.ps1"You can get it from Github:
https://github.com/josuemb/HumanTechSolutions.PowerShell.XmlUtils
Do a pull request. It will be welcome.
We are using Apache License 2.0
See our licence file: LICENSE
Test a given XML file for errors.
Different ways to test if file "c:\temp\myxmlfile.xml" have some errors:
Test-Xml -Path "c:\temp\myxmlfile.xml"
Test-Xml -FullName "c:\temp\myxmlfile.xml"
Test-Xml "c:\temp\myxmlfile.xml"File without errors:
File with errors:

