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

            我參與的團(tuán)隊(duì)

            搜索

            •  

            積分與排名

            • 積分 - 328483
            • 排名 - 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 閱讀(599) 評論(0)  編輯 收藏 引用 所屬分類: C#
            久久国产乱子精品免费女| 国产精品无码久久综合| 久久亚洲国产精品五月天婷| 精品久久久久久无码中文字幕| 久久久久久毛片免费看| 久久久久久精品免费免费自慰| 三上悠亚久久精品| 久久天天躁狠狠躁夜夜不卡| 亚洲综合精品香蕉久久网| 丁香五月综合久久激情| 久久香综合精品久久伊人| 99久久精品国产一区二区三区 | 成人综合久久精品色婷婷| 久久久久亚洲AV片无码下载蜜桃| 久久久久久久综合日本亚洲| 一级a性色生活片久久无| 嫩草影院久久99| 亚洲综合伊人久久综合| 国产呻吟久久久久久久92| 亚洲午夜无码久久久久| 久久一区二区免费播放| 26uuu久久五月天| 久久精品国产亚洲AV无码娇色| 欧美成人免费观看久久| 国产精品狼人久久久久影院 | 99蜜桃臀久久久欧美精品网站| 久久这里只有精品久久| 99国产欧美久久久精品蜜芽| 国产精品成人久久久| 老司机午夜网站国内精品久久久久久久久| 久久久久亚洲Av无码专| 久久综合狠狠综合久久综合88| 99久久国产亚洲综合精品| 亚洲欧美成人久久综合中文网 | 欧美亚洲另类久久综合婷婷| 国产激情久久久久影院| 伊人久久大香线蕉影院95| 色综合久久综精品| 88久久精品无码一区二区毛片 | 国产成人久久精品一区二区三区| 亚洲国产香蕉人人爽成AV片久久|