如何验证 XPS 文档?
是否有任何 C# API 可以验证生成的 XPS 文档? (即确保该文件是有效的 xps 文件)
Is there any C# API to validate a generated XPS document?
(i.e. to make sure the file is a valid xps file)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不知道 API,但有一个 Microsoft 工具可以测试文件是否符合 XML Paper 规范:
http://msdn.microsoft.com/en-us/library/aa348104.aspx
干杯!
Don't know about an API, but there is a Microsoft tool that tests a file's conformity to the XML Paper Specification:
http://msdn.microsoft.com/en-us/library/aa348104.aspx
Cheers!
XPs只是一种XML格式。
您可以尝试:
解压它。您将看到所有 xml。
有相当多的文件和
目录。
从以下位置下载 xps 的 XML 纸张规范
http://www.microsoft.com/whdc/device/print/xps /xpsspec.mspx。
所以现在你有了
XPS 规范、模式(有五个)、
和一大堆 xml 文档
来验证。
当然,一旦您弄清楚哪个模式对应于哪个 xml 文件,就有很多简单的方法可以在 C# 中验证 xml。
祝你好运。
Xps just an XML format.
You could try:
unzip it. You will see all the xml.
There are quite a few files and
directories.
Download the XML Paper Specification for xps from
http://www.microsoft.com/whdc/device/print/xps/xpsspec.mspx.
So now you have the
spec for xps, the schemas (there are five),
and a whole bunch of xml documents
to validate.
There are of course plenty of easy ways to validate xml in C# once you figure out which schema corresponds to which xml file.
Good luck with that.