• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            為生存而奔跑

               :: 首頁 :: 聯系 :: 聚合  :: 管理
              271 Posts :: 0 Stories :: 58 Comments :: 0 Trackbacks

            留言簿(5)

            我參與的團隊

            搜索

            •  

            積分與排名

            • 積分 - 329120
            • 排名 - 74

            最新評論

            閱讀排行榜

            評論排行榜

            Recently, I tried to port some Java code to C#. Most Java code use SAX to process XML. .net framework library does not support SAX. It supports XMLReader instead. I tried to compare both approaches to see which one would result in cleaner implementation. I encountered two articles. The first article is onxml.com. The article gave a nice example on how to port SAX code to XMLReader code. The second article is by  Dino Esposito on zdnet. The article favors the .net approach considering Dino is largely a Microsoft guy

            The difference is tat SAX use a push model while XMLReader uses a pull model. With SAX, we just need to set up an event handler. The default SAX parser acts as a driver to parse the document and fire the events. With XMLReader, we have to create a loop that keeps calling the read method of the XMLReader class. We then have to implement a switch construction that dispatch the processing to other procedures depending on the node type. This model is similar to how we process the Windows message loop. It is possible to construct the dispatching mechanism to be like that of SAX.  At the first glance, it takes less code to setup SAX parser. However, in the subsequent processing, we can call one of the readxxx method of XMLReader to pull additional information. This would gives us more control and cleaner implementation than the SAX model.

            posted on 2010-03-07 16:10 baby-fly 閱讀(601) 評論(0)  編輯 收藏 引用 所屬分類: C#
            粉嫩小泬无遮挡久久久久久| 日本亚洲色大成网站WWW久久| 色综合久久久久综合99| 理论片午午伦夜理片久久| 久久九九久精品国产免费直播| 日韩AV无码久久一区二区| 久久久久夜夜夜精品国产| 久久久久亚洲国产| 久久国产美女免费观看精品 | 久久天天躁狠狠躁夜夜网站| 国内精品久久久久影院一蜜桃 | 狠狠精品干练久久久无码中文字幕| 久久99热这里只有精品66| 欧美伊香蕉久久综合类网站| 午夜精品久久久久久| 国产国产成人精品久久| 精品免费久久久久久久| 亚洲国产成人精品久久久国产成人一区二区三区综 | 精品熟女少妇av免费久久| 欧美成人免费观看久久| 国产精品成人久久久久久久 | 亚洲国产高清精品线久久| 很黄很污的网站久久mimi色| 久久久久无码精品国产不卡| 无码国内精品久久人妻| 久久天天躁狠狠躁夜夜不卡| 久久国产成人| 国产精品综合久久第一页| 国产精品久久毛片完整版| 一本色道久久88精品综合| 日产精品99久久久久久| 污污内射久久一区二区欧美日韩 | 无码人妻久久一区二区三区免费 | 四虎国产精品免费久久久| 国产精品无码久久综合| 久久婷婷五月综合色高清| 伊人久久综合成人网| 国产A三级久久精品| 久久综合狠狠综合久久综合88| 国产精品久久久久蜜芽| 狠狠色噜噜色狠狠狠综合久久|