如何比较java中的文档对象与.xsd文件?
我试图比较 Document 对象以了解它们是否格式良好。为此,我对此进行了研究,并听说 xsd 文件用于进行此比较。您能给我一些基本示例来比较文档与使用 xsd objcets 吗?
例如,我必须在 xsd 文件中写入什么以及如何将其与 Document 对象进行比较?
谢谢大家
I am trying to compare Document objects to understand if they are well formed or not. So to do that, I made a research about it and heard that xsd files are used to make this comparison. Can you please give me some basci examples to compare document with using xsd objcets ?
For example what do I have to write into xsd file and how I can compare it with a Document object ?
Thank you all
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不需要 XSD 架构来确定文档是否格式良好。您只需要它来确定文档对于架构是否有效。
我不确定“比较 XML 文档”是什么意思。你拿它们来比较什么?
You don't need an XSD schema to determine if a document is well-formed. You only need it to determine if the document is valid against the schema.
I'm not sure what you mean by "comparing XML documents". What are you comparing them with?