I am trying to read in data from an API with Azure Data Factory. First I need to call a log in method, which provides an XML response. I need to take an element from that XML and put it into my next API call to get the data that I need.
Currently I am using the Copy data tool to call the log in method and save the XML to blob storage. How do I now read an element of that XML into a variable?
If there is a better way of doing this then please advise, but I would still like to know how to read an XML element into a variable.
Edit: here is the XML being returned. I need to capture the SessionID.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<DoLoginResponse xmlns="http://foo.bar">
<DoLoginResult>
<OperationStatus>true</OperationStatus>
<StatusMessage />
<SecurityProfile>
<User></User>
<Session>
<SessionId>d2cf6ea6-120f-4bff-a5d1-adad9063d9d2</SessionId>
</Session>
<IsFirstLogon>true</IsFirstLogon>
<IsSystemOwner>false</IsSystemOwner>
</SecurityProfile>
</DoLoginResult>
</DoLoginResponse>
</soap:Body>
</soap:Envelope>



