检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]北方民族大学计算机科学与工程学院,宁夏银川750021
出 处:《现代电子技术》2008年第10期103-105,共3页Modern Electronics Technique
摘 要:当今许多企业多数使用DOM(文档对象模型)和SAX(XML的简单API)处理XML数据。DOM的主要缺点是在XML文档被导航之前必须在内存里建立其完整的树形结构。为此,处理XML大文档需要消耗大量内存。而SAX的主要缺点在于应用程序被动地接收解析器生成的事件,因此不能通过导航随意浏览和修改XML文档的指定部分。Java EE 5新推出的StAX(Streaming API for XML,XML流式API)很好地解决了上述问题。StAX既有SAX的效率,又有DOM强大的功能。介绍StAX这种最新XML数据解析技术的开发背景,分析其解析机理和技术内涵,并在此基础之上给出一个使用基于事件迭代器的API集合解析XML文件的应用示例。实际操作表明StAX为流式处理XML提供了一个标准、双向模式的解析器接口,比StAX更简单,比DOM管理内存更有效。Nowadays, DOM and SAX are used for XML data processing in most enterprises. The main disadvantage is that an entire tree structure of a XML document must be created in the memory before it can be navigated, Consumption of a huge memory is needed for processing a big XML document, The Shortcoming of SAX is that applications passively receive the generated events by a parser, As a result, browsing and dealing with specified parts of a XML document are impossible. StAX (Streaming API for XML) introduced by Java EE 5 gives a good answer. StAX has the same efficiency as SAX,as well as the same powerful function as DOM. The development background of StAX, a latest parsing technique for XML data. is covered. The parsing mechanics and technical meaning are analyzed. On this basis, an application example for parsing XML document is given, which uses the StAX API based on the iterator. The practice proves that StAX provided a typical and dual interface for XML,it is more similiar and efficiency than SAX and DOM.
分 类 号:TP312[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.117