xmlreader

    0熱度

    1回答

    考慮下面的XML(例如): <root> <foo>some data</foo> <bar>some other data</bar> </root> 我目前正在讀它: reader.ReadToFollowing("root") if(reader.HasAttributes) { /* not relevant in this usecase*/ } while

    0熱度

    1回答

    我無法提取XML文件的某些部分。 拿這個示例XML: <toplevel> <profile> <technology type="java" /> <technology type="dotnet" /> <technology type="sdk" /> <technology type="webserver" /> <license int

    1熱度

    1回答

    在我的Rss Feeds閱讀系統中,我需要刪除任何存在的腳本塊,因爲有人說這會讓XmlReader混淆。 對於我正在做這一塊的代碼,我在網絡上找到: allXml = Regex.Replace(allXml, "(.*)<script type='text/javascript'>.+?</script>(.*)", "$1$2"); 但這是太慢了...有什麼辦法來執行呢?我已經嘗試先做比賽

    0熱度

    1回答

    我正在使用xml讀取器來讀取我的xml文件並將一部分xml文件內容存儲在變量中。我能夠在控制檯中僅查看內容,但無法存儲結果在一個變量用它來later.How存儲在一個變量一個XML文件的內容是什麼?下面是我的代碼 var data = new Issue(); using (XmlReader reader = XmlReader.Create("SeleniumTest.xml")

    0熱度

    1回答

    我的應用程序從網上下載一個壓縮的XML文件,並試圖創建XML閱讀: var fullReportUrl = "http://..."; // valid url here //client below is an instance of HttpClient var fullReportResponse = client.GetAsync(fullReportUrl).Result; va

    0熱度

    1回答

    我想解析一個大的XML文件。它看起來像: <application> <action-keys> <case-file>...</case-file> <case-file>...</case-file> <case-file>...</case-file> </action-keys> <action-keys> <case-

    2熱度

    2回答

    問題 在我的多行字符串文字xml的開頭應該忽略空格嗎? 代碼 string XML = @" <?xml version=""1.0"" encoding=""utf-8"" ?>" using (StringReader stringReader = new StringReader(XML)) using (XmlReader xmlReader = XmlReader.C

    0熱度

    1回答

    我是C#的新手。我有一個相對較大的XML文件(28MB),並試圖根據它們的內容將它的子樹解析成幾種不同的類型。從本質上講,我有6900+個內容節點,所有內容節點都必須經過詢問才能確定它們是什麼類型。 <Collections> <Content>..</Content> <Content>..</Content> <Content>..</Content>

    0熱度

    1回答

    我有一個很大的XML文件,我必須使用XmlReader讀取它,因爲它無法加載到內存中。該XML以這種方式(是一個簡化版本)格式: <?xml version="1.0" encoding="windows-1252"?> <Products> <Product> <Code>A14</Code> <Name>Name1</Name> <Manufac

    0熱度

    1回答

    我得到XmlReader與數據。如何將它轉換爲ASP.NET Core MVC中的JSON? 例如: using (SqlCommand command = new SqlCommand("SELECT * FROM Sample for XML AUTO", connection as SqlConnection)){ XmlReader xml = command.ExecuteXm