Could you help
Dim ScriptDOC As XDocument
ScriptDOC = XDocument.Parse(e.Result)
Dim Result = From ele In XElement.Parse(ScriptDOC.ToString).Elements("HANDERDETAILS")
If IsNothing(Result.Descendants("RESULT")) = False Then status = Result.Descendants("RESULT").Value
If LCase(status) = "ok" Then
If IsNothing(Result.Descendants("BRANCHID")) = False Then BranchID = Result.Descendants("BRANCHID").Value
End If
From converter I got this code:
XDocument ScriptDOC = default(XDocument);
string status = "";
ScriptDOC = XDocument.Parse(e.Result);
dynamic Result = from ele in XElement.Parse(ScriptDOC.ToString).Elements("HANDERDETAILS");
if ((Result.Descendants("RESULT") == null) == false)
status = Result.Descendants("RESULT").Value;
if (Strings.LCase(status) == "ok") {
if ((Result.Descendants("BRANCHID") == null) == false)
BranchID = Result.Descendants("BRANCHID").Value;
}
which is not good.
This is my xml:
<AAAAA>
<HANDERDETAILS>
<RESULT>OK</RESULT>
<BRANCHID>4</BRANCHID>
<HANDLERID>1</HANDLERID>
<HANDLERNAME>some Admin</HANDLERNAME>
<BRANCHNAME>Asome New</BRANCHNAME>
</HANDERDETAILS>
</AAAAA>