久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  1. <tfoot id='PonpU'></tfoot>
      <bdo id='PonpU'></bdo><ul id='PonpU'></ul>

      <small id='PonpU'></small><noframes id='PonpU'>

      <legend id='PonpU'><style id='PonpU'><dir id='PonpU'><q id='PonpU'></q></dir></style></legend>

    1. <i id='PonpU'><tr id='PonpU'><dt id='PonpU'><q id='PonpU'><span id='PonpU'><b id='PonpU'><form id='PonpU'><ins id='PonpU'></ins><ul id='PonpU'></ul><sub id='PonpU'></sub></form><legend id='PonpU'></legend><bdo id='PonpU'><pre id='PonpU'><center id='PonpU'></center></pre></bdo></b><th id='PonpU'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='PonpU'><tfoot id='PonpU'></tfoot><dl id='PonpU'><fieldset id='PonpU'></fieldset></dl></div>
    2. 將 XML 文件讀取為 DataSet

      Read XML file as DataSet(將 XML 文件讀取為 DataSet)

      1. <legend id='VVVWG'><style id='VVVWG'><dir id='VVVWG'><q id='VVVWG'></q></dir></style></legend>

              <tbody id='VVVWG'></tbody>

            1. <tfoot id='VVVWG'></tfoot>
            2. <small id='VVVWG'></small><noframes id='VVVWG'>

                <bdo id='VVVWG'></bdo><ul id='VVVWG'></ul>

                <i id='VVVWG'><tr id='VVVWG'><dt id='VVVWG'><q id='VVVWG'><span id='VVVWG'><b id='VVVWG'><form id='VVVWG'><ins id='VVVWG'></ins><ul id='VVVWG'></ul><sub id='VVVWG'></sub></form><legend id='VVVWG'></legend><bdo id='VVVWG'><pre id='VVVWG'><center id='VVVWG'></center></pre></bdo></b><th id='VVVWG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='VVVWG'><tfoot id='VVVWG'></tfoot><dl id='VVVWG'><fieldset id='VVVWG'></fieldset></dl></div>
                本文介紹了將 XML 文件讀取為 DataSet的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我對解析 XML 文件沒有經驗,我正在將折線圖數據保存到 xml 文件中,所以我做了一些研究.根據 this文章,在所有讀取 XML 文件的方法中,DataSet 是最快的.我使用 DataSet 是有道理的,因為可能存在大量數據.這是我的圖表文檔的外觀:

                I am inexperienced with parsing XML files, and I am saving line graph data to an xml file, so I did a little bit of research. According to this article, out of all the ways to read an XML file, DataSet is the fastest. And it makes sense that I use DataSet since there could be a significant amount of data. Here's how my graph documents look:

                <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
                <BreezyCalc>
                    <Graph Version="3.0" Mode="static">
                        <Range>
                            <X Min="-20" Max="20" />
                            <Y Min="-20" Max="20" />
                        </Range>
                        <Lines>
                            <Line Name="MyLine1" R="0" G="255" B="0">
                                <Point X="-17" Y="9" />
                                <Point X="7" Y="-5" />
                                <Point X="10" Y="4" />
                                <Point X="-6" Y="2" />
                            </Line>
                            <Line Name="MyLine2" R="255" G="0" B="0">
                                <Point X="-7" Y="3" />
                                <Point X="8" Y="-1" />
                                <Point X="-4" Y="-4" />
                                <Point X="-1" Y="6" />
                            </Line>
                        </Lines>
                    </Graph>
                </BreezyCalc>
                

                由于這些線中可能存在大量點,因此我需要以盡可能少的資源盡快獲取數據.如果有比 DataSet 更快的方法,請賜教.否則,有人可以告訴我如何使用 DataSet 作為我的 XML 解析器來獲取我的圖形數據嗎?

                Since there could be a large number of points in these lines, I need to get the data as quickly and with as little resources as possible. If there is a faster approach than DataSet, please enlighten me. Otherwise, could someone show me how I would get my graph data using a DataSet as my XML parser?

                推薦答案

                如果要使用DataSet,很簡單.

                If you want to use a DataSet, it is very simple.

                // Here your xml file
                string xmlFile = "Data.xml";
                
                DataSet dataSet = new DataSet();
                dataSet.ReadXml(xmlFile, XmlReadMode.InferSchema);
                
                // Then display informations to test
                foreach (DataTable table in dataSet.Tables)
                {
                    Console.WriteLine(table);
                    for (int i = 0; i < table.Columns.Count; ++i)
                        Console.Write("	" + table.Columns[i].ColumnName.Substring(0, Math.Min(6, table.Columns[i].ColumnName.Length)));
                    Console.WriteLine();
                    foreach (var row in table.AsEnumerable())
                    {
                        for (int i = 0; i < table.Columns.Count; ++i)
                        {
                            Console.Write("	" + row[i]);
                        }
                        Console.WriteLine();
                    }
                }
                

                如果您想要更快的速度,您可以嘗試使用 XmlReader 逐行讀取.但是開發難度有點大.你可以在這里看到它:http://msdn.microsoft.com/library/cc189056(v=vs.95).aspx

                If you want something faster, you can try with XmlReader which read line after line. But it is a bit more difficult to develop. You can see it here : http://msdn.microsoft.com/library/cc189056(v=vs.95).aspx

                這篇關于將 XML 文件讀取為 DataSet的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標簽的 XML)
                Parsing tables, cells with Html agility in C#(在 C# 中使用 Html 敏捷性解析表格、單元格)
                delete element from xml using LINQ(使用 LINQ 從 xml 中刪除元素)
                Parse malformed XML(解析格式錯誤的 XML)
                <i id='H3gT2'><tr id='H3gT2'><dt id='H3gT2'><q id='H3gT2'><span id='H3gT2'><b id='H3gT2'><form id='H3gT2'><ins id='H3gT2'></ins><ul id='H3gT2'></ul><sub id='H3gT2'></sub></form><legend id='H3gT2'></legend><bdo id='H3gT2'><pre id='H3gT2'><center id='H3gT2'></center></pre></bdo></b><th id='H3gT2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='H3gT2'><tfoot id='H3gT2'></tfoot><dl id='H3gT2'><fieldset id='H3gT2'></fieldset></dl></div>

              • <small id='H3gT2'></small><noframes id='H3gT2'>

                <legend id='H3gT2'><style id='H3gT2'><dir id='H3gT2'><q id='H3gT2'></q></dir></style></legend>

                          <tbody id='H3gT2'></tbody>
                        • <bdo id='H3gT2'></bdo><ul id='H3gT2'></ul>
                        • <tfoot id='H3gT2'></tfoot>

                        • 主站蜘蛛池模板: 奇米超碰 | 国产在线a| 日韩在线视频观看 | 狠狠的干狠狠的操 | 日日日日日日bbbbb视频 | 日韩一区二区在线观看视频 | 久久久久久久久久影视 | 欧美精品久久 | 毛片com | 亚洲视频在线免费观看 | 午夜精品视频在线观看 | 久久精品电影 | 狠狠干夜夜草 | 亚洲一区二区三区免费在线 | 91素人| 欧美中文字幕一区二区三区亚洲 | 国产精品久久久久久久久久久久 | 国产精品久久久久久久白浊 | 中文字幕一区二区三区乱码图片 | 亚洲欧美精品国产一级在线 | 国产成人一区二区三区 | 91精品国产91久久久久久吃药 | 日韩精品一区二区三区视频播放 | 久久99网 | 一区二区三区在线免费 | 天天干天天干 | 亚洲精品无人区 | 欧美一区二区在线 | 欧美色性 | 亚洲一在线 | 风间由美一区二区三区在线观看 | 久久久久亚洲精品 | 精品久久久久久亚洲精品 | 最新av片 | 夜夜骑首页 | 天天夜碰日日摸日日澡 | 国产成人精品一区二区三区四区 | 成人激情免费视频 | 日韩精品在线观看一区二区三区 | 日韩一区二区视频 | 久久久精 |