- XML code
<xs:element name="GetAllManufacturersVehicleReportDataSchema_v1.0.2363.26364" msdata:IsDataSet="true" msdata:Locale="en-AU" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="Table"> <xs:complexType> <xs:sequence> <xs:element name="Vehicle_ID" type="xs:int" minOccurs="0" /> <xs:element name="Created_Date" type="xs:dateTime" minOccurs="0" /> <xs:element name="Current_Model" type="xs:string" minOccurs="0" /> <xs:element name="Make" type="xs:string" minOccurs="0" /> <xs:element name="Marketing_Model" type="xs:string" minOccurs="0" /> <xs:element name="Variant" type="xs:string" minOccurs="0" /> <xs:element name="Model_Release_Year" type="xs:int" minOccurs="0" /> <xs:element name="Transmission_Type" type="xs:string" minOccurs="0" /> <xs:element name="Body_Style" type="xs:string" minOccurs="0" /> <xs:element name="Fuel_Type" type="xs:string" minOccurs="0" /> <xs:element name="Engine_Displacement" type="xs:string" minOccurs="0" /> <xs:element name="Engine_Configuration" type="xs:string" minOccurs="0" /> <xs:element name="Induction" type="xs:string" minOccurs="0" /> <xs:element name="Fwd_Gears_No" type="xs:string" minOccurs="0" /> <xs:element name="Side_Door_No" type="xs:string" minOccurs="0" /> <xs:element name="Seating_Capacity" type="xs:string" minOccurs="0" /> <xs:element name="Driving_Wheels_No" type="xs:string" minOccurs="0" /> <xs:element name="Vehicle_Class" type="xs:string" minOccurs="0" /> <xs:element name="CO2_Emissions" type="xs:int" minOccurs="0" /> <xs:element name="Fuel_Consumption" type="xs:double" minOccurs="0" /> <xs:element name="Air_Pollution_Rating" type="xs:string" minOccurs="0" /> <xs:element name="Greenhouse_Rating" type="xs:string" minOccurs="0" /> <xs:element name="GVG_Star_Rating" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType></xs:element>
我通过webservice得到这么一段xml。
用doc.SelectSingleNode("/element/complexType/choice/element/complexType/sequence")
这样定位到sequence节点,可返回的都是null,不知道该如何定位了,请高手帮忙了。Thanks
------解决方案--------------------------------------------------------
up
------解决方案--------------------------------------------------------