摘要: 针对在XML文档树模型中进行后兄弟节点查询时内存消耗大、匹配效率低等缺陷,提出一种基于XML数据流与栈的后兄弟查询算法。采用SAX解析器与结构连接方法,对XML文档中所有已知节点与后兄弟节点进行精确匹配并输出。结果表明,该算法具有适用范围广、占用系统资源少、匹配效率高等优势。
关键词:
SAX解析器,
XML数据流,
后兄弟
Abstract: There are some disadvantages, consuming a large amount of memories, matching with low efficiency, to query following-sibling nodes in XML document tree model. This paper provides an algorithm based on XML data stream and stack for querying following-sibling. The algorithm uses Simple API for XML(SAX) parser and structural join, matches and outputs all following-sibling nodes of the given nodes. Results show that the algorithm has the advantage of wide applicability, low system resource occupancy and high efficiency matching.
Key words:
Simple API for XML(SAX) parser,
XML data stream,
following-sibling
中图分类号:
汪万根. XML数据流中的后兄弟查询算法[J]. 计算机工程, 2009, 35(8): 107-109.
WANG Wan-gen. Algorithm for Querying Following-sibling on XML Data Stream[J]. Computer Engineering, 2009, 35(8): 107-109.