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

            我參與的團隊

            搜索

            •  

            積分與排名

            • 積分 - 326993
            • 排名 - 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 閱讀(591) 評論(0)  編輯 收藏 引用 所屬分類: C#
            久久精品免费一区二区| 2021国产成人精品久久| 精品国产日韩久久亚洲| 99久久精品国产一区二区 | 精品久久久久久| 精品久久久久久久久久中文字幕| 久久久WWW成人免费毛片| 国产成人无码精品久久久性色| 99久久精品毛片免费播放| 久久久久亚洲AV无码专区体验| 久久久久久夜精品精品免费啦| 久久电影网2021| 久久影视综合亚洲| 99久久国产综合精品麻豆| 性做久久久久久久久浪潮| 99久久国产热无码精品免费| 波多野结衣久久一区二区| 国产亚洲色婷婷久久99精品91| 亚洲AV无码久久精品蜜桃| 亚洲色欲久久久久综合网| 国产 亚洲 欧美 另类 久久| 99久久婷婷国产综合亚洲| 久久综合偷偷噜噜噜色| 久久亚洲AV无码西西人体| 久久精品国产91久久综合麻豆自制| 日韩精品无码久久久久久| 久久免费看黄a级毛片| 亚洲欧美一级久久精品| 亚洲一本综合久久| 国产精品成人99久久久久| 久久精品国产亚洲一区二区| 久久Av无码精品人妻系列 | 亚洲级αV无码毛片久久精品| 久久久午夜精品| 久久激情亚洲精品无码?V| 精品久久一区二区三区| 国内精品伊人久久久久av一坑 | 亚洲欧洲精品成人久久奇米网| 精品久久久久国产免费| 久久成人永久免费播放| 久久综合久久性久99毛片|