Posted in Webmaster

Using xmllint program for Windows 7

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:

  • iconv
  • libxml2
  • libxmlsec
  • libxslt
  • zlib

Steps to install:

  1. Extract the zip files and put it in one folder, I named it xmlan
  2. 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
  3. Put the xml file that you want to validate there too, e.g. example.xml

To validate XML files

  1. Open Powershell and open the directory containing XML applications and files. Mine is in C:\Users\User\xmlan\XML
  2. Make it work with the below command:
$ .\xmllint example.xml
an example result of xml errors

To count the number of strings in XML files

  1. Open CMD prompt and open the directory containing XML applications and files. Mine is in C:\Users\User\xmlan\XML
  2. Type the below command:
$ findstr -N "example string" example.xml | find /c ":"
example of the match string count

References:


Special thanks to my hacker fellow šŸ¼ , who helped me find the above stuff within seconds.

Author:

Happiness Engineer at Automattic | WordPress enthusiast | Google Product Expert for Indonesian Google Webmaster forum | Singing all the time šŸŽµ

Leave a comment