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

            我參與的團隊

            搜索

            •  

            積分與排名

            • 積分 - 329108
            • 排名 - 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#
            人妻精品久久久久中文字幕| 色诱久久久久综合网ywww| 亚洲国产精品久久久久婷婷老年| 国产精品99精品久久免费| 国产巨作麻豆欧美亚洲综合久久| 久久久青草青青国产亚洲免观| 97久久国产综合精品女不卡| 青青青伊人色综合久久| 久久精品综合网| 精品久久人人妻人人做精品 | 国产精品一区二区久久国产| 久久久人妻精品无码一区| 欧洲人妻丰满av无码久久不卡| 久久久久国产| 91精品国产91热久久久久福利| 久久精品国产精品亚洲精品 | 久久亚洲中文字幕精品有坂深雪| 久久婷婷国产麻豆91天堂| 7777久久久国产精品消防器材| 久久国产成人亚洲精品影院| 国产成人久久精品区一区二区| 无码任你躁久久久久久老妇App| 久久精品国产一区二区三区不卡| 精品国产乱码久久久久久1区2区 | 欧美伊人久久大香线蕉综合 | 久久国产精品99精品国产| 亚洲欧洲精品成人久久曰影片| 91精品婷婷国产综合久久| 日本精品久久久久中文字幕| 久久99精品综合国产首页| 99久久精品国内| 久久国产精品一区二区| 99999久久久久久亚洲| 国产69精品久久久久777| 精品国产乱码久久久久久1区2区| 国产精品99久久99久久久| 97久久超碰国产精品2021| 国产产无码乱码精品久久鸭| .精品久久久麻豆国产精品| 亚洲一区中文字幕久久| 狠狠综合久久综合中文88|