久久久久久久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的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我對解析 XML 文件沒有經(jīng)驗(yàn),我正在將折線圖數(shù)據(jù)保存到 xml 文件中,所以我做了一些研究.根據(jù) this文章,在所有讀取 XML 文件的方法中,DataSet 是最快的.我使用 DataSet 是有道理的,因?yàn)榭赡艽嬖诖罅繑?shù)據(jù).這是我的圖表文檔的外觀:

                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>
                

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

                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 逐行讀取.但是開發(fā)難度有點(diǎn)大.你可以在這里看到它: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

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

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

                相關(guān)文檔推薦

                Ignore whitespace while reading XML(讀取 XML 時忽略空格)
                XML to LINQ with Checking Null Elements(帶有檢查空元素的 XML 到 LINQ)
                Reading XML with unclosed tags in C#(在 C# 中讀取帶有未閉合標(biāo)簽的 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>

                        • 主站蜘蛛池模板: 三级av在线 | 欧美不卡在线 | 久久人人网 | 天天干b| 精品欧美一区二区三区久久久小说 | 天天干b| 亚洲国产精品成人无久久精品 | 日韩精品免费看 | 黄色国产 | 午夜精品一区二区三区在线视 | 国产一区中文字幕 | 国产激情精品一区二区三区 | 91国内精精品久久久久久婷婷 | 久久国产精品一区二区三区 | 在线伊人网| 男人天堂99| 成人在线免费视频 | 国产在线精品一区二区 | 久久久人成影片一区二区三区 | 国产成人99久久亚洲综合精品 | 999久久久国产精品 欧美成人h版在线观看 | 日韩一级免费观看 | 精品一区久久 | 日韩在线观看中文字幕 | аⅴ资源新版在线天堂 | 欧洲亚洲视频 | 日韩另类 | 亚洲三区在线观看 | 一区二区精品 | 超碰高清| 亚洲国产视频一区二区 | 国产一区| 成人欧美日韩一区二区三区 | 农夫在线精品视频免费观看 | 久久国内精品 | 成人免费在线 | 六月色婷 | 在线中文视频 | 奇米影视77| 黄色毛片网站在线观看 | 免费黄色片在线观看 |