xmllint DTD验证语法 [英] xmllint DTD validation syntax
问题描述
尝试验证XML文档;但是,xmllint坚持将选项作为文件读取,因此我收到FileNotFound异常.只是为了确认一下,我将xmllint.exe与XML文件放在同一文件夹中.我在CMD中找到目录,然后输入命令:
Trying to validate an XML document; however, xmllint is insisting on reading the options as the file so I'm getting FileNotFound exceptions. Just to confirm, I have the xmllint.exe in the same folder as my XML file. I locate the directory in CMD and enter the command:
xmllint --noout --valid file.xml
DTD位于xml文件中.但是,xmllint正在寻找文件~/--nout
.我尝试将文件放在选项之前,但是,选项然后不被应用.我对此还比较陌生,因此毫无疑问,问题很明显.
The DTD is located within the xml file. However, xmllint is looking for the file ~/--nout
. I have tried putting the file before the options, however, the options are then not applied. I'm relatively new to this, so I have no doubt the problem is obvious.
谢谢.
这是拒绝工作的屏幕截图> :(
Here is a screenshot of it refusing to work >:(
推荐答案
我很确定您没有使用 xmllint ,但另一个名称相同的程序.
I am pretty sure that you aren't using xmllint, but another program with the same name.
我怀疑您正在尝试使用 http://code.google.com/p/xmllint/ .有了它,我可以重现您的错误消息.该程序唯一可以做的就是漂亮地打印输入文件.
I suspect that you are trying to use http://code.google.com/p/xmllint/. With it, I can reproduce your error message. The only thing that this program can do is to pretty-print the input file.
可从 http://www.zlatkovic.com/libxml.en.html上获得Windows的真正xmllint.一个>.从
The real xmllint for Windows is available at http://www.zlatkovic.com/libxml.en.html. Download libxml2-2.7.8.win32.zip, iconv-1.9.2.win32.zip, and zlib-1.2.5.win32.zip from the download area. Put the contents of the "bin" directory of each package in a single place. Read the "Getting The Binaries" and "Installing" sections for details.
这篇关于xmllint DTD验证语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!