Hi Forum,
I need a Code to extract some information from XML file.
The XML file contains major data, and I have to extract some information and save it in Excel.
Can anyone help me with the solution?
Here Please check the xml written.
(Removed “>” because it was not taking it as link and I cant share the post)
From this we need to extract 5 values
1.)imp:acct_num
2.)imp:trans_id
3.)imp:trans_eff_dt
4.)imp:ben_op_cd
5.)imp:brnc_cd
Hi @Yoichi
Thanks for your reply.
I would like to know why have we given
xns =******
Because in every xml this link will change.
And the data we need to extract will remain same.
And also we have to just not get this values.
We need around 50 more values from same xml that I can’t provide here.
I need to save the values in datatable because I have to dump the data into excel.
Hi @Yoichi
I cannot share the file as I am not allowed to share the file by UiPath Forum.
The Output that you have shared is correct only thing is we need to save it in the form of Datatable.
Can’t we have any VB Code for this where we should not use the xDoc.Root.Name.Namespace and data can be saved.
Your XML has namespace uri and namespace prefix (imp:). So basically it’s necessary to handle the xml with using namespace.
As another approach, in string manipulation (regex etc), it’s unnecessary to use XML namespace. However, it depends on XML file if it works well.
Brnch will occur more than once, so we need to save it accordingly.
We don’t know how many times brnch will occur, so can’t give it in data table as column name
Then how will we get to solve this?