Problem with xmllint

Learn User Support course Forums Course Discussion Problem with xmllint


Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
  • #8385

    Hello everyone…

    I’m currently on Troubleshooting Import lesson, and struggling on using the xmllint to check errors on XML files. I understand that it is a Unix/Linux command, but I’m currently using Windows 7.

    After searching on the web, I figured out that xmllint needs to be installed separately, so I did install it to my computer. Though I have to use a little bit different command to run it.

    And then, when I try to answer the quiz, I got this result:

    None of those errors match with the quiz options, which means I might not applying the correct command or there is something missing on my steps.

    Does anyone have any input on this?
    Any help would be appreciated.

    Thank you in advance,

    • This topic was modified 4 years, 8 months ago by Nazrina.

    @bonekarusia The good news is, you’re on the right track! πŸ™ŒπŸΎ

    The error thrown by xmllint does not say exactly why the document is currently broken. Instead, it gives you a hint regarding where to start looking for the actual issue.

    As a next step here, we recommend opening the .XML file in a text editor like and checking to see if you can find the missing tag manually!


    Thanks, Mahangu! I’ve successfully found the missing tag.

    My next challenge was to find the equivalent of grep command for Windows, but I figured it out.

    Completed the quiz and proceeding to the next lesson. πŸ™‚


    Excellent! πŸ™ŒπŸΎ We’ve updated the lesson with instructions for Windows users on how to install xmllint / grep, so thank you for that feedback as well.



    I am struggling completing the quiz for Troubleshooting Imports. I’m also using Windows 7 and I also able to figure out that I have to install xmllint separately. However, to be honest, I don’t know what special command I need to use to make it work. Fortunately, I was able to get the missing tag manually using the Sublime Text 2.

    Now, the challenge I’m having is the grep command. I followed the instructions on this link and I was able to successfully install it. However, when I try to open it, it would automatically close out. Since I cannot use it, I searched on google for the equivalent commands for windows, but I can’t find the specific command format to get the answers to the questions.

    I would really appreciate any help from this. A newbie for Unix/Linux command. πŸ™‚
    Thank you!


    Hello Camsmariah,

    When I typed xmllint example.xml it didn’t work for me. I’m using Powershell v1.0.

    What did work: .\xmllint example.xml

    Or you can also use .\xmllint --valid --noout example.xml

    Change example.xml to the file name given in the quiz.

    And about the equivalent of grep command, I use findstr. So I didn’t install grep, I only use CMD prompt.

    This one worked for me: findstr -N "example string" example.xml | find /c ":"

    Change “example string” to “post_type>post” or whatever string you look for.

    The second code was only working on the CMD prompt, not on Powershell. Not sure why.

    I hope that will work for you too.



    Thanks for sharing what you did, @bonekarusia! πŸ™ŒπŸΎ


    Happy to share ☺️

    Oh, and I was mistaken about the Powershell version. Mine is actually version 2.0.


    Hello Nazrina,

    Thank you for your suggestions! I was actually using findstr but not really sure how to properly use it in cmd. I got a different answer for the navigation menu count thou. But that’s fine. At least I learned something today! I’m also using Powershell and did exactly what you mentioned but I’m still getting “\xmllint is not recognized as the name of a cmdlet” error. It says Powershell v1.0 but I searched on Google that if you have Windows 7 it is also considered version 2.0. So, I’m not sure why it’s not working. But that’s fine, I found the correct missing tag manually but I missed to choose the correct answer on the quiz. (I overlooked it, my bad!) I’m happy to complete the lesson and got a passing score!

    I’m happy to learn something new today! I really appreciate your help!
    I’m excited for the next lesson! πŸ™‚


    Awesome! Glad to hear ☺️

    Did you type dot (.) before \xmllint? Like .\xmllint


    Yes I did. Here’s a screenshot. I’m not sure why it’s not working or what I did incorrectly.


    Hey Cams, did you run it on the correct path?

    I saved all the xmllint files in a folder, and when I run the Powershell, I open this specific folder first: C:\Users\User\xmlan\XML

    I know that this is not a problem anymore for you since you found the error anyway, but if you’re curious to find out what you might miss, I’ve documented the installation process in this blog post. It’s password protected, the password is: XMLlint

    If it still doesn’t work, don’t sweat it. Perhaps it is a bug on Powershell. It is expected since we use the very old version, lol.

    Or perhaps I have some apps/programs in my system that is missing in yours.

    • This reply was modified 4 years, 8 months ago by Nazrina.

    Hello Nazrina,

    I also have thought that I used an incorrect path. So I saved the xml file to another folder and run it again. However, I’m still getting the same error. I also thought that maybe it’s because I’m using an old version! πŸ˜€

    I’m also curious why it’s not working for me. I will check your blog post. And when all else fail, I will just believe that it’s because I’m using an old version! lol πŸ˜€

    Thanks for all your help! πŸ™‚


    Anytime. I hope you’ll get this sorted out in one way or another.

    Wish us luck on the next lesson! πŸ˜ƒ


    @camsmariah It looks like the path for xmllint executable is different than what you are using (I am assuming that from the error). Did you install it at c:\Windows\System32\WindowsPowerShell\v1.0 ? If not try changing current directory to where xmllint is installed. Mine was C:\XML\ and executable was under bin directory so my current directory had to be C:\XML\bin and then I ran the command.

    Also, are you running windows 32 bit or 64 bit?

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.