Skip to content

stgaup/XPathVerify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reads XML files and checks if the given XPath exists.

Usage:
XPathVerify.exe [RootPath] [XPath] [IsMissing]

RootPath - Where in the file system to start looking.
XPath - The XPath of the element to look for.
IsMissing (y/n) (optional) - Only output the files that are missing? If omitted, all files will be listed with an indication of wether or not they contain the xml element which the XPath is pointing to.

Examples:

Find all web.config files which have a targetFramework of 4.6.1:
XPathVerify.exe C:\DevProjects\MyProject web*.config /configuration/system.web/compilation[@targetFramework='4.6.1'] n

Find all web.config files which do not have a targetFramework of 4.6.1:
XPathVerify.exe C:\DevProjects\MyProject web*.config /configuration/system.web/compilation[@targetFramework='4.6.1'] y

Find all web.config files, and write out wether or not they have the correct target framework:
XPathVerify.exe C:\DevProjects\MyProject web*.config /configuration/system.web/compilation[@targetFramework='4.6.1'] n

Find out how many web.config files have the targetFramework set to 4.6.1, by piping to the dos FIND-command:
XPathVerify.exe C:\DevProjects\MyProject web*.config /configuration/system.web/compilation[@targetFramework='4.6.1'] n | find /c /v ""

Just for fun...

About

Initial checkin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages