I am trying to get the baseCode64 Data within my response data. I am getting the ReturnCode but how can I get the data inside the "Payload".
For example my response data looks like this:
<xml_response xsi:type="xsd:string"><![CDATA[<CertificateRequest><ReturnCode>0</ReturnCode><Payload content_type="application/pdf" embedded="base64">SGVsbG8gV29ybGQ=</Payload></CertificateRequest>]]></xml_response>
To get the ReturnValue I have coded this:
XElement xmlTree = XElement.Parse(response_data);
XElement returnCode = xmlTree.Element("ReturnCode");
XText returnCode_Value = returnCode.FirstNode as XText;
String b1 = returnCode_Value.Value;
Now, how can I get the Value inside the Payload which I to convert in plaintext or create a pdf.
I tried to use the same way with paylaod but i doesn't work. I am getting nothing:
XElement returnCode = xmlTree.Element("Payload");
An if I display the Elements with:
XElement xmlTree = XElement.Parse(response_data);
XElement new_data = xmlTree.Elements();
I am just getting:
0
I has been displayed the Element Payload. This is very interesting but why?
getStringData_b1_de? A short but complete program would be useful here.XElement returnCode = xmlTree.Element("Payload"), what is the value ofreturnCodeafter that line? A null? AnXElementwith no content?