关于expat库的编译

1、expat库简介

    refer to wiki:

    To use the Expat library, programs first register handler functions with Expat. When Expat parses an XML document, it calls the registered handlers as it finds relevant tokens in the input stream. These tokens and their associated handler calls are called events. Typically, programs register handler functions for XML element start or stop events and character events. Expat provides for more sophisticated event handling such as XML Namespace declarations, processing instructions and DTD events.
     Expat is parsing events resemble the events defined in the Simple API for XML (SAX), but Expat is not a SAX-compliant parser. Projects incorporating the Expat library often build SAX and possibly DOM parsers on top of Expat. While Expat is mainly a stream-based (push) parser, it supports stopping and restarting parsing at arbitrary times, thus making the implementation of a pull parser relatively easy as well
.

  

        为了使用Expat库,程序首先在Expart中住一个处理器函数(handler functions) 。当Expat解析XML文档时,发现输入流中有相关的令牌会调用已经注册的处理器(handlers) ,这些令牌(tokens)和其先关的处理器(handler)被称作事件。通常情况下, 程序会为XML元素中的开始事件、停止事件、字符事件(character events)注册处理函数。Expat提供了 更多复杂事件处理,例如XML命名空间声明,处理指令和DTD事件。

     Expat是定义在SAX中的解析事件或类似事件。但是它不是一个严格的服从SAX的解析器。Expat是主要基于流的解析器(推送) ,它支持在任意时间停止和重新启动的解析器,从而使相关的拉动型解析器(pull parser )实现很容易。
    (第一次翻译,翻译的不好啊~~~)

      

      说白了 ,Expat是一个面向流的xml解析器。

 

2、expat库的交叉编译

     expat-2.0.1.tar.gz

 

    ./configure --host=arm-none-linux-gnueabi --prefix=/root/Qt/output/qt-arm/    

     make && make install

发布了33 篇原创文章 · 获赞 1 · 访问量 11万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章