[英]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.