【发布时间】:2020-11-06 04:20:16
【问题描述】:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetLoginResponse xmlns="http://example.com">
<GetLoginResult>
<xs:schema id="GetLoginIDResponse" targetNamespace="http://example.com/GetLoginIDResponse.xsd" xmlns:mstns="http://example.com/GetLoginIDResponse.xsd" xmlns="http://example.com/GetLoginIDResponse.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="GetLoginIDResponse" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="GetLoginIDResult">
<xs:complexType>
<xs:sequence>
<xs:element name="LoginID" type="xs:string" minOccurs="0" />
<xs:element name="Status" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<GetLoginIDResponse xmlns="http://example.com/GetLoginIDResponse.xsd">
<GetLoginIDResult diffgr:id="GetLoginIDResult1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
<LoginID>123456</LoginID>
<Status>SUCCESS</Status>
</GetLoginIDResult>
</GetLoginIDResponse>
</diffgr:diffgram>
</GetLoginResult>
</GetLoginResponse>
</soap:Body>
</soap:Envelope>
我怎样才能分别获得LoginID 和Status?它只在列中显示LoginID 和Status。怎么拆分?
【问题讨论】:
标签: sql-server xml soap xquery