0
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:def="http://www.w3.org/2002/ws/databinding/examples/6/09/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<types>
<xs:schema xmlns="http://www.w3.org/2002/ws/databinding/examples/6/09/"
targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
elementFormDefault="qualified">
<xs:include xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap11enc="http://schemas.xmlsoap.org/soap/encoding/"
schemaLocation="http://www.w3.org/2002/ws/databinding/examples/6/09/static/Included.xsd"/>
<xs:include xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap11enc="http://schemas.xmlsoap.org/soap/encoding/"
schemaLocation="http://www.w3.org/2002/ws/databinding/examples/6/09/static/Included.xsd"/>
<xs:element name="echoInclude">
<xs:complexType>
<xs:sequence>
<xs:element ref="ex:include"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</types>
</definitions>
在上述XML我想获取的schemaLocation的每XS的值属性:包括元件,其内部的xs:schema元素LINQ查询解析/从该XML抓取内容(WSDL)
做ü认为它应该像doc.Descendants.Descendents因为XS:模式是内部类型是里面的文件,因此它不工作 – Abhi 2012-01-02 10:28:06
考虑我的文章作为参考。你可以尝试 - doc.Descendants(ns +“schema”)。后代(ns +“include”) – adatapost 2012-01-02 10:33:28
谢谢你,我已经稍微更新了你的答案 – Abhi 2012-01-02 10:38:51