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

            我參與的團隊

            搜索

            •  

            積分與排名

            • 積分 - 327087
            • 排名 - 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#
            日日躁夜夜躁狠狠久久AV| 99久久超碰中文字幕伊人| 精品久久综合1区2区3区激情| 无码人妻久久一区二区三区免费| 国产精品禁18久久久夂久| 久久久久一区二区三区| 四虎亚洲国产成人久久精品| 久久人人爽人人爽人人片AV不| 久久久久人妻一区二区三区vr| 99精品伊人久久久大香线蕉| 久久福利资源国产精品999| 久久精品水蜜桃av综合天堂 | 99久久国产亚洲高清观看2024 | 亚洲精品国产综合久久一线| 久久亚洲精品无码VA大香大香| 久久国产色AV免费看| 人妻无码精品久久亚瑟影视| 久久综合丝袜日本网| 欧洲成人午夜精品无码区久久| 久久人人爽人人精品视频| 国产精品青草久久久久婷婷 | 蜜臀久久99精品久久久久久小说| 久久精品亚洲精品国产欧美| 国产人久久人人人人爽| 99久久国产亚洲综合精品| 精品久久久久中文字幕一区| 潮喷大喷水系列无码久久精品| 热99RE久久精品这里都是精品免费 | 精品欧美一区二区三区久久久| 无码人妻久久一区二区三区| 久久影院久久香蕉国产线看观看| 久久这里只有精品首页| 97精品国产91久久久久久| 精品久久久久中文字幕日本| 无码国内精品久久人妻蜜桃| 亚洲女久久久噜噜噜熟女| 亚洲人成伊人成综合网久久久 | 国产免费久久久久久无码| 国产精品免费久久久久久久久| 热久久国产精品| 国产视频久久|