gokul1904
(Glory 01)
August 17, 2022, 6:54am
1
new 1.xml (1.5 KB)
Hi team ,
I have attached the xml.
Please help me in extracting “CMP0767” which is the company id and
“EUR” which is the currency descriptor and “9783” which is the currency numeric code.I tried many ways but was not able to get the values.
Yoichi
(Yoichi)
August 17, 2022, 7:30am
2
Hi,
Hope the following sample helps you.
xns = "urn:com.workday.repoting_main"
xelmCompany = xdoc.Descendants(xns+"Company").Where(Function(x) x.Element(xns+"ID").Value="CMP0767").FirstOrDefault()
dict =xelmCompany.Element(xns+"Currency").Elements(xns+"ID").ToDictionary(Function(x) x.attributes(xns+"type").First.Value,Function(x) x.Value)
Sample20220817-3.zip (3.3 KB)
Regards,
1 Like
gokul1904
(Glory 01)
August 17, 2022, 8:33am
3
Hi Yoichi ,
It helps me in extracting currency descriptor and currency numeric code but not “CMP0767”.
I also want to extract the company id which is “CMP0767” in this case.
Can you help me in designing the code line for that ?
Thank you for the solution for the rest cases.It works fine
Regards,
Gokul
gokul1904
(Glory 01)
August 17, 2022, 8:36am
4
Also I wanted the currency from the wd:Descriptor line not from the attribute “Currency_ID”.I have highlighted the one in the post above.
Regards,
Gokul
ushu
(Usha kiranmai)
August 17, 2022, 8:38am
5
Hi @gokul1904 - Please check the attached workflow to extract the highlighted values as shown in the above screenshots
Example.zip (4.3 KB)
Note : You forgot to close the tags for wd:Report_Data, wd:Report_Entry, I did that change in that attached xml
1 Like
gokul1904
(Glory 01)
August 17, 2022, 8:42am
6
Perfect! Thanks a lot Usha - It will be a learning curve for me too.
Appreciate it
Regards,
Gokul
system
(system)
Closed
August 20, 2022, 8:42am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.