• <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>

            為生存而奔跑

               :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
              271 Posts :: 0 Stories :: 58 Comments :: 0 Trackbacks

            留言簿(5)

            我參與的團隊

            搜索

            •  

            積分與排名

            • 積分 - 328781
            • 排名 - 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 閱讀(600) 評論(0)  編輯 收藏 引用 所屬分類: C#
            97久久精品国产精品青草| 国产精品久久久久久福利69堂| 久久99精品国产一区二区三区| 国产精品视频久久| 国产精品内射久久久久欢欢| 美女久久久久久| 国产成人精品免费久久久久| 久久se精品一区二区影院| 亚洲精品白浆高清久久久久久 | 久久久久亚洲AV成人网| 亚洲午夜精品久久久久久app| 亚洲综合日韩久久成人AV| 97精品国产97久久久久久免费| 久久久久亚洲国产| 久久综合九色综合97_久久久| 久久青青草视频| 国产成人AV综合久久| 色88久久久久高潮综合影院| 国产精品日韩深夜福利久久| 色综合久久久久无码专区| 午夜精品久久久久| 国产精品久久久久久久久久免费| 午夜精品久久久久久99热| 久久一区二区三区免费| 国产精品成人精品久久久 | a级成人毛片久久| 国产美女亚洲精品久久久综合| 精品一久久香蕉国产线看播放| 国产成人久久激情91| 久久夜色精品国产欧美乱| 久久精品国产亚洲AV久| 久久亚洲国产精品五月天婷| 精品国产一区二区三区久久蜜臀| 精品国产一区二区三区久久| 久久久久久国产精品无码超碰| 久久无码AV中文出轨人妻| 亚洲国产高清精品线久久| 亚洲v国产v天堂a无码久久| 久久免费国产精品| 中文精品久久久久人妻| 久久午夜免费视频|