计算机工程与应用 ›› 2007, Vol. 43 ›› Issue (5): 102-105.

• 产品、研发、测试 • 上一篇    下一篇

基于Xerces2-java的多XML文档关联验证

姚雷 唐亚哲 杨宇彬 赵铭   

  1. 西安交通大学电信学院计算机系统结构与网络研究所
  • 收稿日期:2006-05-29 修回日期:1900-01-01 出版日期:2007-02-11 发布日期:2007-02-11
  • 通讯作者: 杨宇彬

A Xerces2-java based Method for Multi-XML Documents correlating Validation

  • Received:2006-05-29 Revised:1900-01-01 Online:2007-02-11 Published:2007-02-11

摘要: XML通过DTD或Schema定义文法。XML解析器根据预定义的文法对XML文档进行验证。但如果应用程序需要处理的多个XML文档,并且这些文档之间存在引用,在应用程序中验证这些引用就非常困难。本文针对多XML文档关联验证,提出了一种通用的基于Xerces2-java的多XML文档关联验证机制,该机制通过扩展Xerces2-java现有的组件,在原有的解析过程中增加了关联验证的逻辑,给应用程序提供了方便、灵活的调用接口。实验表明,该机制能够完成XML文档的关联验证,较好地解决了多XML文档关联验证问题。

关键词: Xerces2-java, 关联验证, 解析器

Abstract: XML uses DTD or Schema to define grammar. XML Parsers validate XML documents according to the defined grammar. But if an application has to manage multiple XML documents and these documents have references among one another, it will be difficult to validate the references. The paper presents a general mechanism for validating multi-XML documents correlation. The proposed mechanism adds correlating validation logic into the current Xerces2-java components and provides convenient application programming interfaces. Experiments show that the mechanism is a good method for multi-XML documents correlating validation.

Key words: Xerces2-java, correlating validation, parser