Hi,
Hope you are doing well.
Can anyone help me to extract all repeated OutpuID’s from below XML response
<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/ ” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance ”>soapenv:Body 2024-05-22T16:42:33.318Zfalsetruefalsepdf3692132024-05-22T16:42:33.318Z2802834928967_Consolidated.pdfS DOCUMENT_PROCESSING_SUCCESSFUL [INSTANCE_ID=bip.bi_server1] 52030_1140302024-05-22T16:42:31.741Zfalsetruefalsepdf3692162024-05-22T16:42:33.032Z2802816001088_1<parentOutputId xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance ”
AJ_Ask
July 20, 2024, 7:52am
2
Hi @divya.x.kuchi
Read your XML file using Read Text File Activity & Give their output to Deserialize XML Activity as input. You will get output from that in this case i have used variable OutXMLDes.
Use this assign & you will have all the output ids in the list format.
(From node In OutXMLDes.Descendants(XName.Get("outputId", "http://xmlns.oracle.com/oxp/service/v2"))
Select node.Value).ToList()
Hope this helps
For Ref-
XML.zip (3.3 KB)
ppr
(Peter Preuss)
July 20, 2024, 10:15am
3
You will handle XML namespaces as described here
Going ahead
Serializing the XML - output: xDoc | DataType: XDocument:
[grafik]
Checking if we have to handle XML namespaces
[grafik]
We do have:
[grafik]
Checking for some children:
[grafik]
Defining Namespace Variable
[grafik]
In some cases, we can also do: Assign Activity - xnsDefault = xDoc.Root.Name.Namespace
Checkin the retrieval
[grafik]
xDoc.Descendants(xnsDefault + "productVersion")
GetDescendants { [<productVersion build="456" xmlns="http://tableau.com/api">123</…
1 Like
system
(system)
Closed
July 24, 2024, 2:42pm
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.