Привет всем! пытаюсь достучаться до тега <CallerInformationSystemSignature> и получить его содержимое.
но все тщетно...
Как быть?
Содержимое XDocument:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
<SendRequestRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn://x-artefacts-smev-gov-ru/services/message-exchange/types/basic/1.1">
<SenderProvidedRequestData Id="SIGNED_BY_CONSUMER">
<MessageID xmlns="urn://x-artefacts-smev-gov-ru/services/message-exchange/types/1.1">Значение0</MessageID>
<MessagePrimaryContent>
<tns:Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="urn://ru.gov.proc.erp.communication/2.0.5" xmlns:erp_types="urn://ru.gov.proc.erp.communication/types/2.0.5" xsi:schemaLocation="urn://ru.gov.proc.erp.communication/2.0.5 ru.gov.proc.erp.communication.smev.xsd">
<erp_types:MessageCommon InfoModel="Значение1" PreviousInfoModel="0">
<erp_types:ProsecutorAsk />
</erp_types:MessageCommon>
</tns:Request>
</MessagePrimaryContent>
<TestMessage xmlns="urn://x-artefacts-smev-gov-ru/services/message-exchange/types/1.1" />
</SenderProvidedRequestData>
<CallerInformationSystemSignature>
<Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411" />
<ds:Reference URI="#SIGNED_BY_CONSUMER">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<ds:Transform Algorithm="urn://smev-gov-ru/xmldsig/transform" />
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#gostr3411" />
<ds:DigestValue>Значение3</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>Значение4</ds:SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>Значение5</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</CallerInformationSystemSignature>
</SendRequestRequest>
Пробую так, не получилось :
1.
2.
3.
4.
5.
var Contact = from xml2 in xdoc.Descendants("CallerInformationSystemSignature") select xml2;
foreach (var item in Contact)
{
}
и так не получилось :
var Contact2 = from xml2 in xdoc.Elements("SendRequestRequest").Elements("SenderProvidedRequestData") select xml2;
1.
2.
3.
4.
foreach (var item in Contact2)
{
}
и так не получилось :
1.
2.
3.
4.
5.
var Contact4 = from xml2 in xdoc.Elements("SenderProvidedRequestData").Elements("CallerInformationSystemSignature") select xml2;
foreach (var item in Contact4)
{
}