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

  1. <i id='fcEpk'><tr id='fcEpk'><dt id='fcEpk'><q id='fcEpk'><span id='fcEpk'><b id='fcEpk'><form id='fcEpk'><ins id='fcEpk'></ins><ul id='fcEpk'></ul><sub id='fcEpk'></sub></form><legend id='fcEpk'></legend><bdo id='fcEpk'><pre id='fcEpk'><center id='fcEpk'></center></pre></bdo></b><th id='fcEpk'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fcEpk'><tfoot id='fcEpk'></tfoot><dl id='fcEpk'><fieldset id='fcEpk'></fieldset></dl></div>
    1. <tfoot id='fcEpk'></tfoot>
        <bdo id='fcEpk'></bdo><ul id='fcEpk'></ul>
    2. <legend id='fcEpk'><style id='fcEpk'><dir id='fcEpk'><q id='fcEpk'></q></dir></style></legend>

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

      從aspx網(wǎng)頁讀取xml

      Reading xml from aspx web page(從aspx網(wǎng)頁讀取xml)

          <tbody id='Nt7dC'></tbody>

          <bdo id='Nt7dC'></bdo><ul id='Nt7dC'></ul>
          • <small id='Nt7dC'></small><noframes id='Nt7dC'>

            1. <tfoot id='Nt7dC'></tfoot>
            2. <legend id='Nt7dC'><style id='Nt7dC'><dir id='Nt7dC'><q id='Nt7dC'></q></dir></style></legend>
              <i id='Nt7dC'><tr id='Nt7dC'><dt id='Nt7dC'><q id='Nt7dC'><span id='Nt7dC'><b id='Nt7dC'><form id='Nt7dC'><ins id='Nt7dC'></ins><ul id='Nt7dC'></ul><sub id='Nt7dC'></sub></form><legend id='Nt7dC'></legend><bdo id='Nt7dC'><pre id='Nt7dC'><center id='Nt7dC'></center></pre></bdo></b><th id='Nt7dC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Nt7dC'><tfoot id='Nt7dC'></tfoot><dl id='Nt7dC'><fieldset id='Nt7dC'></fieldset></dl></div>
                本文介紹了從aspx網(wǎng)頁讀取xml的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                限時送ChatGPT賬號..

                我們必須從一個 aspx 頁面中讀取數(shù)據(jù).當(dāng)我們使用查詢字符串調(diào)用頁面時,它會返回一個 xml 文檔,其中包含與查詢字符串匹配的數(shù)據(jù).

                We have to read data from a aspx page. When we call the page with a query string, it returns an xml document with data that matches the query string.

                我們有一個與我們返回的 xml 匹配的 XSD.

                We have an XSD that matches the xml that we get back.

                我認(rèn)為我們可以從 http 響應(yīng)中讀取 xml 文檔.這行得通嗎?

                I am thinking that we can read the xml document out of the http response. Will this work?

                我們?nèi)绾?em>綁定 XML 與 XSD,以便我們可以將 XML 文檔視為強(qiáng)類型?

                How can we bind the XML with the XSD, such that we can treat the XML document as if it were strongly typed?

                謝謝,

                設(shè)拉子

                更新:

                找到這個關(guān)于如何反序列化的鏈接

                Found this link on how to deserialize

                在 C# 中將 XML 反序列化為對象

                推薦答案

                嗯,基本上,你可以請求一個類似這樣的 XML 文檔(這里沒有 try/catch - 但你絕對應(yīng)該添加它!):

                Well, basically, you can request an XML document something like this (no try/catch here - but you should definitely add that!):

                HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
                myRequest.Method = "POST";  // or GET - depends 
                
                myRequest.ContentType = "text/xml; encoding=utf-8";
                myRequest.ContentLength = data.Length;
                
                using (Stream reqStream = myRequest.GetRequestStream())
                {
                  // Send the data.
                  reqStream.Write(data, 0, data.Length);
                  reqStream.Close();
                }
                
                // Get Response
                WebResponse myResponse;
                
                myResponse = myRequest.GetResponse();
                XmlDocument _xmlDoc = new XmlDocument();
                
                using (Stream responseStream = myResponse.GetResponseStream())
                {
                   _xmlDoc.Load(responseStream);
                }   
                

                您有 GET 還是 POST 取決于您的場景 - 在 GET 中,您不會有請求數(shù)據(jù)輸出.

                Whether you have a GET or POST depends on your scenario - in a GET, you won't have request data going out.

                一旦您將 XML 作為 XmlDocument 恢復(fù),您可以根據(jù) XML 架構(gòu)對其進(jìn)行驗證,或者只是嘗試將其反序列化為您擁有的 XSD 架構(gòu)所表示的類型.

                Once you have your XML back as a XmlDocument, you can either validate that against the XML schema, or just try to deserialize it into the type that is represented by the XSD schema you have.

                如果可行 --> 你得到的 XML 是有效的并且沒問題.如果沒有,您將在反序列化時遇到異常.

                If that works --> the XML you got is valid and OK. If not, you'll get an exception on deserialization.

                馬克

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

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

                相關(guān)文檔推薦

                What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                onClick event for Image in Unity(Unity中圖像的onClick事件)
                Running Total C#(運(yùn)行總 C#)
                Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                Calling A Button OnClick from a function(從函數(shù)調(diào)用按鈕 OnClick)

                  <tbody id='RLbrq'></tbody>
                <i id='RLbrq'><tr id='RLbrq'><dt id='RLbrq'><q id='RLbrq'><span id='RLbrq'><b id='RLbrq'><form id='RLbrq'><ins id='RLbrq'></ins><ul id='RLbrq'></ul><sub id='RLbrq'></sub></form><legend id='RLbrq'></legend><bdo id='RLbrq'><pre id='RLbrq'><center id='RLbrq'></center></pre></bdo></b><th id='RLbrq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RLbrq'><tfoot id='RLbrq'></tfoot><dl id='RLbrq'><fieldset id='RLbrq'></fieldset></dl></div>

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

                      <bdo id='RLbrq'></bdo><ul id='RLbrq'></ul>
                      <legend id='RLbrq'><style id='RLbrq'><dir id='RLbrq'><q id='RLbrq'></q></dir></style></legend>

                      1. <tfoot id='RLbrq'></tfoot>

                        • 主站蜘蛛池模板: 欧美一区二区在线观看 | 中文字幕 在线观看 | 在线国产99 | 福利视频日韩 | 97影院在线午夜 | yiren22 亚洲综合 | 欧美性生活一区二区三区 | 青青草中文字幕 | 在线观看中文字幕 | 国产日韩一区二区三免费高清 | 久久这里只有 | 日本免费一区二区三区四区 | 欧美一级免费看 | 亚洲国产精品久久久 | 天天人人精品 | 天天操天天射综合网 | 久久精品久久久久久 | 黄色一级大片视频 | 亚洲视频区| 99免费在线视频 | 成在线人视频免费视频 | 成人免费看片 | 9久9久 | 日韩在线中文 | 亚洲在线久久 | 99热电影| 国产成人精品一区二区三区视频 | 黄色免费在线观看网站 | 在线免费观看日本视频 | 欧美性受xxx | 亚洲午夜在线 | 日日操夜夜干 | 91高清在线观看 | 99久久精品国产一区二区三区 | 激情久久网 | 国产在线精品一区 | 狠狠干影院 | 99精品在线观看 | 色综合成人网 | 精品人伦一区二区三区蜜桃网站 | 国产精品中文字幕在线观看 |