I would like to get the value of the ‘native’ attribute in the ‘callid’ -element.
I have tried this on Write Line, after using the Deserialize Xml -Activity: resultXML.Element(“callid”).Attribute(“native”).Value.ToString and many other variations of this. It doesn’t work. Only gives this error: Write line : Object reference not set to an instance of an object.
Is there a way I could get the value of the attribute quickly and easily with a command like that?
I have tried other solutions found on this forum, but they don’t wor for this file for some reason.
EDIT: also I’ve tried the execute XPath activity with: “//callid/@native”
It gives the result as an Object-variable. Is there a way I could print that as a string?
Is there something wrong with my XPath command? The execution never even enters the for each loop. The variable ‘xmlValue’ is the result from the ‘Execute XPath’ activity.
I have now. The XPath result is still an Object -variable. How do you print that? I tried result.ToString but it only prints this: System.Xml.XPath.XPathEvaluator+d__1`1[System.Object]
Unfortunately I cannot share the file. I’ve tried the Get XML Nodes and Get XML Node Attributes -activities and I was able to find the right attribute in a string format.