[英]C# XSD schema - how to get main properties values?
我已經加載了XSD架構定義( XDocument
變量類型),我不知道如何獲取someProperty
值。 有任何想法嗎 ?
<xsd:form-definition xmlns:xsd="http://url/lorem.xsd"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
...
someProperty="ABC">
...
</xsd:form-definition>
使用LINQ to XML很簡單:
var attributes = (from n in xml.Root.Attributes("someProperty")
select n.Value).ToList();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.