關於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萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章