作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2009, Vol. 35 ›› Issue (4): 48-50. doi: 10.3969/j.issn.1000-3428.2009.04.016

• 软件技术与数据库 • 上一篇    下一篇

基于C语言的轻量级高效XML编解码器

查 峰   

  1. (华为技术有限公司南京研究所,南京 210012)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2009-02-20 发布日期:2009-02-20

Light Effective XML Encoding and Decoding Module Based on C

ZHA Feng   

  1. (Nanjing Institute, Huawei Technology Company, Nanjing 210012)
  • Received:1900-01-01 Revised:1900-01-01 Online:2009-02-20 Published:2009-02-20

摘要: 将树形数据结构用于最小化DOM模型XML编解码器的开发。在解析XML文本时,基于Expat解释器将XML字符串构造成树状结构;编码时构造DOM树结构,采用非递归深度优先法遍历树,将其串行化成XML串。本编解码器解决了国际化语言关键问题,是一个通用、高效的工业级XML应用支撑模块。

关键词: XML解析器, DOM模型, Expat解释器

Abstract: This paper designs a DOM liked tree data structure for developing a minimal DOM based eXtended Marked Language(XML) coding and encoding module. When parsing XML text, based on expat, it puts the parsed content into the tree. When encoding, it constructs a DOM tree, then use non-recursion depth-first method to access the tree and serialize it into XML text. This module also solves the key problem of international language, and forms an universal, highly effective and industrial-level-reached basic module for XML application.

Key words: eXtended Marked Language(XML) parser, DOM model, Expat interpreter

中图分类号: