针对一类特殊的、复杂的无双亲信息兄弟关系,设计了无双亲信息兄弟关系查询算法。设计了编码方案和栈存储方案,快速实现查询处理;归纳了结点栈和双亲栈操作的条件,以及当前处理结点的操作。实验结果说明查询过程大部分无效结点可以通过P/C和Following关系判断快速跳过,该算法可以高效地处理无双亲信息兄弟关系查询,且输出结果能够保持文档序。
Considering a class of special and complex sibling relation query without any parents’ information ,an effi‐cient algorithm is proposed .The efficient labeling scheme and two‐stack‐based storing method are carefully regulated to ac‐celerate the query process .And then the operation conditions for the two stacks and the operation of the current processing node are concluded .The experiment results show that ,by simply computation of the P/C and Following relationship ,a lot of invalid nodes can be skipped quickly and the query can be accelerated .Therefore ,this proposed algorithm can well settle the complex sibling query ,and output XML document segment in correct document order .