Hello All,
I am working on project now start with call soap API and read specific attribute from response I can read all response but can not read specific attribute my response XML look like below:
I want to read only “value3” attribute only so I tried below but return “Object reference not set to an instance of an object.”
and for name space declaration
Thanks in advance
ppr
(Peter Preuss)
February 16, 2021, 12:39am
2
@mahmoud.zaky
have a look here:
@Fabian_DDD
I do feel that a XPath Approach is better for the retrieval
Setting up a NamespaceManager with a Config Datatable:
[grafik]
for the default namespace with empty prefix “def” is assigne as prefix
the retrieval is configured as another datatable (could also be externalize into an excel)
[grafik]
I did also for a deeper nested element for demo purpose
After all preperation it is iterating over the retrieval config and retrieves the specfied values. et voila:
[grafik]
So this …
thanks for your reply but i tried to make above solution with no luck as i am still new in uipath and its the first time to handle XML
ppr
(Peter Preuss)
February 16, 2021, 10:24am
4
No Problem, just share with us a sample xml as text and we will help you based on this
1 Like
Thank you for your patience and kindly find below txt file contains sample XML
test.xml (435 Bytes)
ppr
(Peter Preuss)
February 16, 2021, 12:16pm
6
@mahmoud.zaky
find starter help (show casing dedicated access and loop over the result element) here:
XMLDemo.xaml (6.7 KB)
in case of retrieval issues following trick helps to find out the needed things:
xDoc.Root.Descendants()(X).Name - play with X=index and find out the needed namespace for a particular element
1 Like
really thanks for your support working fine
system
(system)
Closed
February 19, 2021, 1:06pm
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.