So, I’m a Windows 7 user and need to use xmllint to check validation of .xml files. Xmllint is typically used on a Unix-based operating system and isn’t a standard part of Windows. It needs to be installed separately.
To download the program, visit here or here. Folders that need to be downloaded are:
Steps to install:
- Extract the zip files and put it in one folder, I named it xmlan
- Copy all the files in the bin folder of each download and create a new folder in xmlan to paste them all there. I named this new folder: XML
- Put the xml file that you want to validate there too, e.g. example.xml
To validate XML files
- Open Powershell and open the directory containing XML applications and files. Mine is in C:\Users\User\xmlan\XML
- Make it work with the below command:
$ .\xmllint example.xml
To count the number of strings in XML files
- Open CMD prompt and open the directory containing XML applications and files. Mine is in C:\Users\User\xmlan\XML
- Type the below command:
$ findstr -N "example string" example.xml | find /c ":"
Special thanks to my hacker fellow 🐼 , who helped me find the above stuff within seconds.