I am trying to get baseCode64 data within my response data I am getting a return code but how can I get data inside "payload"
For example, my feedback data looks like this:
& lt; Xml_response xsi: type = "XSD: string '& gt; & lt; [CDATA [& lt; certificateRequest> gt; return code & gt; 0 & lt; / returncode & gt; & lt; payload content_type =" application / PDF "embedded =" base64 "> SGVsbG8gV29ybGQ = & lt; / payload & gt; & lt; / certificateRequest & gt;]] & gt; & lt; / xml_response & gt;
XElement xmlTree = XElement.Parse (response_data); XElement returnCode = xmlTree.Element ("ReturnCode"); XText Return CODE_Value = returnCode.XText as the first node; string B1 = return CODE_Value.Value;
Now, how do I value the value within the payload? I can convert, which I will convert to plain text or make PDF.
I tried to use it with paylaod but I do not work. I can not find anything:
XElement returnCode = xmlTree.Element ("payload");
If I show an element with it:
XElement xmlTree = XElement.Parse (response_data); Excellence new_data = xmlTree.Elements ();
I'm just getting:
0
The element payload has been displayed to me. It is very interesting but why?
You do not show the code where you are trying to access is the value of payload
I'm guessing what you want to do, but try this:
XElement payload = xmlTree.Element ("payload"); String B2 = Payload. value;
No comments:
Post a Comment