摘要: 在祖先-后裔关系匹配算法中,多数都是首先利用XML解析器将XML文档解析分裂为元素(或属性)列表进行存储,然后在这些分裂得到的元素(或属性)列表之间进行祖先-后裔关系的结构连接。该文的算法SSD不需要事先将源XML文档分裂为元素(或属性)列表进行存储,而是直接将源XML文档作为输入,采用SAX来产生XML数据流,然后基于XML数据流实现祖先-后裔关系匹配。通过分析可知,该算法适用面广,仅需要对源XML文档进行一次扫描,占用系统资源少,且具有很高的匹配效率。
关键词:
XML文档,
数据流,
祖先-后裔关系,
SAX
Abstract: In most ancestor-descendant matching algorithm, it is more often to parse and split XML document with XML parser into element (or attribute) lists to store, and then make structural join according to the ancestor-descendant relationship between the element (or attribute) lists split. In the algorithm SSD proposed here, this paper directly inputs XML document, instead of splitting them into element (or attribute) lists to store. First it produces XML stream with SAX, and then attains ancestor-descendant matching based on XML stream. In term of analysis, SSD is more efficient with wider applicability, only once-scan, lower system resource occupancy and high-rate matching than others.
中图分类号:
汪万根,万常选. XML数据流中祖先-后裔关系匹配算法[J]. , 2005, 31(09): 110-112.
WANG Wangen, WAN Changxuan. Algorithm for Matching Ancestor-Descendant Relationship on XML Stream[J]. , 2005, 31(09): 110-112.