sgx
sgx

Reputation: 1317

Installing xmllint

I needed help installing xmllint from this website: http://xmlsoft.org/sources/win32/

In particular, I am not sure which file I am supposed to download - when I click the link for precompiled Windows binaries I am brought to a list of several files and not sure how to proceed.

Upvotes: 56

Views: 111499

Answers (7)

user1427673
user1427673

Reputation: 139

On Windows (I'm using 10 Pro, but this could work on most versions I suppose) I work with MobaXTerm which provides an ubuntu terminal emulation, and installing xmllint is a one liner:

apt install libxml2

Upvotes: 1

Erik Stabij
Erik Stabij

Reputation: 389

On Debian/Ubuntu-derived distributions, xmllint is part of the libxml2-utils package.

To install:

sudo apt install libxml2-utils

On RedHat-derived Linux distros, xmllint comes in the same package as the library itself, so it's very likely you already have it.

Upvotes: 28

rsano
rsano

Reputation: 1250

I had the same problem and it took me two hours to make it work.

  1. Download iconv, libxml2, libxmlsec, and zlib from [ftp://ftp.zlatkovic.com/libxml/][1]
  2. Extract the zip file then copy all the files in the bin folder of each download.
  3. Paste the files in a folder (mine = XML)
  4. Add the C:\folderName (mine = C:\XML) in the path system variable. (I'm using Windows 8, for Windows 7 users here's a link):
    • Windows key + r (run window)
    • Type control panel then press Enter.
    • Type path in search box.
    • Under System, click "Edit the system environment variables".
    • Under the Advanced tab, click "Environment variables".
    • In the System variables look for Path → Edit → add ;C:\folderName,
    • or just type path in search box located in your Windows 8 charms.
  5. Make it work (I only type xmllint and I had no idea why I cant see the xmllint window. This is a note for beginners)
    • copy a xml file into the xmllint directory

    • type xmllint --valid --noout fileName.xml.

      If you get this message:

      warning : failed to load external entity "fileName.xml"

      then that's likely a bug so download an older version of libxml2 from http://xmlsoft.org/sources/win32/ or assign another folder to your XML files and run xmllint from there.

      In the command window :

      • cd C:\Users\user name\Documents\XML files.
      • Once you're inside it, type the xmllint commands e.g. xmllint --valid --noout fileName.xml).

Reference:

Upvotes: 72

Nicholas Saunders
Nicholas Saunders

Reputation: 764

at least on centOS:

[nsaunders@rolly ~]$ 
[nsaunders@rolly ~]$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 8.2.2004 (Core) 
Release:    8.2.2004
Codename:   Core
[nsaunders@rolly ~]$ 

it's as easy as:

sudo yum install xmlstarlet so that now xmllint is installed as:

[nsaunders@rolly ~]$ 
[nsaunders@rolly ~]$ xmllint --version
xmllint: using libxml version 20907
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug Zlib Lzma 
[nsaunders@rolly ~]$ 

Upvotes: 1

Andreas Maier
Andreas Maier

Reputation: 3080

For users of Chocolatey, installing xmllint is rather simple:

choco install xsltproc

This package contains the xmllint, iconv, xmlcatalog, and xsltproc commands, and any dependencies are installed automatically.

Upvotes: 39

Blane
Blane

Reputation: 673

The link from C.M. Sperberg-McQueen is a good starting point. You need to 1) download the libxml2 package, and 2) place the bin folder that comes with this in a directory contained in your PATH environmental variable.

If you don't know how to figure out which directories are in your PATH environmental variable follow this: http://www.computerhope.com/issues/ch000549.htm.

Upvotes: 1

C. M. Sperberg-McQueen
C. M. Sperberg-McQueen

Reputation: 25034

It is true that xmlsoft.org does not have much information about how to install xmllint in Windows.

Perhaps (as already suggested by Quentin in a comment) the information at http://www.zlatkovic.com/libxml.en.html will help you.

Upvotes: 5

Related Questions