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

            我參與的團隊

            搜索

            •  

            積分與排名

            • 積分 - 329120
            • 排名 - 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#
            久久99精品久久只有精品| 久久亚洲精品人成综合网| 久久久久国色AV免费观看| 一个色综合久久| 久久精品人人槡人妻人人玩AV| 久久99国产精品久久久| 久久综合久久美利坚合众国 | 久久青青草原精品国产不卡| 亚洲人成无码网站久久99热国产 | 久久婷婷是五月综合色狠狠| 久久国产亚洲精品麻豆| 日韩精品久久久肉伦网站| 日韩AV毛片精品久久久| 国产高潮久久免费观看| 国产精品久久久久国产A级| 久久亚洲精品成人无码网站| 国产精品美女久久久久av爽| 国产亚洲精品自在久久| 日韩精品久久无码中文字幕| 久久天天躁狠狠躁夜夜avapp| 欧美成a人片免费看久久| 久久精品国产福利国产秒| 久久ww精品w免费人成| 久久这里只有精品18| 欧美一区二区三区久久综| 人妻无码αv中文字幕久久琪琪布| 亚洲欧美国产日韩综合久久| 精品久久久久久久久久中文字幕 | 99久久精品国产一区二区三区 | 久久福利片| 久久精品无码一区二区app| 99热成人精品免费久久| 热久久这里只有精品| 99久久精品国产一区二区| 国产999精品久久久久久| 精品久久久久一区二区三区 | 久久久久久久综合日本亚洲| 91精品国产综合久久婷婷| 久久精品一区二区三区不卡| 99热精品久久只有精品| 欧美性猛交xxxx免费看久久久|