xml 安装 xmllint

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19546854/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-06 14:13:35  来源:igfitidea点击:

Installing xmllint

xmldtdxmllint

提问by don

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

我需要帮助从这个网站安装 xmllint: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.

特别是,我不确定我应该下载哪个文件 - 当我单击预编译 Windows 二进制文件的链接时,我被带到了一个包含多个文件的列表,但不知道如何继续。

回答by rsano

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

我遇到了同样的问题,我花了两个小时才让它工作。

  1. Download iconv, libxml2, libxmlsec , zlib from ftp://ftp.zlatkovic.com/libxml/
  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. (btw, im using windows 8, for win7 users here's a link http://www.itechtalk.com/thread3595.html) :
    • windows key + r (run window)
    • type control panel then press enter
    • type path in search box
    • under System - click edit the system environment variable
    • 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 win8 charms( I should have thought of that)
  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
      everything's fine, CONGRATS
      Else
      If you also have this warning : failed to load external entity "fileName.xml"
      -- they say its a bug so I downloaded an older versionof libxml2 from http://xmlsoft.org/sources/win32/
      OR (I just saw this solution earlier)
      -- assign another folderto 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)
  1. ftp://ftp.zlatkovic.com/libxml/下载 iconv、libxml2、libxmlsec、zlib
  2. 解压 zip 文件,然后复制每次下载的 bin 文件夹中的所有文件。
  3. 将文件粘贴到文件夹中(我的 = XML)
  4. 在路径系统变量中添加 'C:\folderName' (mine = 'C:\XML')。(顺便说一句,我使用的是 windows 8,对于 win7 用户,这里有一个链接http://www.itechtalk.com/thread3595.html):
    • windows键+r(运行窗口)
    • 输入控制面板然后按回车
    • 在搜索框中输入路径
    • 在系统下 - 单击编辑系统环境变量
    • 在高级选项卡下 - 单击环境变量
    • 在系统变量中查找 Path > Edit > add ";C:\folderName"
    • 或者只是在位于您的 win8 魅力的搜索框中输入“路径”(我应该想到这一点)
  5. 让它工作(我只输入 xmllint,我不知道为什么我看不到 xmllint 窗口。这是初学者的注意事项)
    • 复制一个xml文件到xmllint目录
    • 输入xmllint --valid --noout fileName.xml

      如果
      一切正常,恭喜,
      否则
      如果您也收到此警告:无法加载外部实体“fileName.xml”
      ——他们说这是一个错误,所以我从http://xmlsoft.org/sources/下载了旧版本的 libxml2 win32/
      或(我之前刚刚看到这个解决方案)
      ——为你的 xml 文件分配另一个文件夹并从那里运行 xmllint。
      在命令窗口中: -cd C:\Users\user name\Documents\XML files -
      进入其中后,键入 xmllint 命令,例如xmllint --valid --noout fileName.xml

installation:
http://flowingmotion.jojordan.org/2011/10/08/3-steps-to-download-xmllint/https://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/docbooksys/segmentedhtml/ch03s03.html
bug :
https://bugzilla.redhat.com/show_bug.cgi?id=863166

安装:
http : //flowingmotion.jojordan.org/2011/10/08/3-steps-to-download-xmllint/ https://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/教程/docbooksys/segmentedhtml/ch03s03.html
错误:https : //bugzilla.redhat.com/show_bug.cgi ? id = 863166

回答by Andreas Maier

For users of Chocolatey, installing xmllint is rather simple:

对于Chocolatey 的用户来说,安装 xmllint 相当简单:

choco install xsltproc

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

这个软件包包含xmllinticonvxmlcatalog,和xsltproc命令,以及任何相关性被自动安装。

回答by C. M. Sperberg-McQueen

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

xmlsoft.org 确实没有太多关于如何在 Windows 中安装 xmllint 的信息。

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

也许(正如 Quentin 在评论中已经建议的那样)http://www.zlatkovic.com/libxml.en.html 上的信息会对您有所帮助。

回答by Blane

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.

来自 CM Sperberg-McQueen 的链接是一个很好的起点。您需要 1) 下载 libxml2 包,以及 2) 将附带的 bin 文件夹放在 PATH 环境变量中包含的目录中。

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.

如果您不知道如何确定 PATH 环境变量中的目录,请按照以下步骤操作:http: //www.computerhope.com/issues/ch000549.htm