• <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#
            久久精品亚洲男人的天堂| 青青草原综合久久大伊人导航| 精品欧美一区二区三区久久久| 久久精品国产亚洲7777| 久久男人中文字幕资源站| 欧美亚洲色综久久精品国产| 久久777国产线看观看精品| 精品久久久无码中文字幕天天| 久久久久亚洲?V成人无码| 亚洲第一永久AV网站久久精品男人的天堂AV | 久久毛片免费看一区二区三区| 精品久久久久久无码不卡| 人妻精品久久久久中文字幕69| 激情伊人五月天久久综合| 久久久久久亚洲精品不卡| 成人久久免费网站| 久久经典免费视频| 日本亚洲色大成网站WWW久久| 久久综合狠狠综合久久| 久久激情亚洲精品无码?V| 精品久久久久久久无码| 亚洲日本va午夜中文字幕久久| 久久一区二区三区免费| 99久久精品毛片免费播放| www.久久热.com| 久久精品青青草原伊人| 精品久久久久久无码不卡| 久久精品国产亚洲精品| 久久精品国产精品青草| 久久人人妻人人爽人人爽| 久久久精品2019免费观看| 久久久久久久免费视频| 久久99热这里只有精品国产| 色综合久久最新中文字幕| 99久久婷婷国产综合精品草原| 色综合久久天天综合| 国产成人久久精品激情| 国产精品一久久香蕉国产线看| 狼狼综合久久久久综合网| 精品久久久久久久久午夜福利| 国产精品对白刺激久久久|