Unable to read the data from XML

My job is to print the cpv code
412490_nl-NL.xml (3.6 KB)
Step1 Read the XML data
Step2 Deserialize the XML
Step3 Print the values
While retrieving the data from XML i always get an empty value
ex: I tried to print the “ESENDER_LOGIN” but am getting an empty value and the same thing happened for all


XPATH should look like this
/TED_ESENDERS/SENDER/IDENTIFICATION/ESENDER_LOGIN

As an alternate give a try on:
Deserialize XML Activity - output xDoc

Assign Activty
Left side: Datatype XElement | xeEsenderLogin
Right side:
xDoc.Root.Descendants(“ESENDER_LOGIN”).First

Log Message: xeEsenderLogin.Value

Otherwise check xDoc.Root.Name()

I have used the above xpath still in the message box showing empty

But we shared also an alternate, Had you tried?

Yeah i tried the second one also
Step1: Read XML
Step2: Deserialize the XML
Step3: Assign to variable (Xelement) type
Step4: Printing that element

out put is Assign: Sequence contains no elements

give me a little time

Yeah sure Thanks
I will follow some examples u have given to others till then

we have to handle namespace


grafik
grafik

we found out by looking on roots name

In Name space we need to pass the root name?

have a look on screenshot with the variables
have a look on …Descendants(xnsDefault + “ESENDER_LOGIN”)

When we want to express the element name we have to give the xnsDefault also

For checking out we did quick check on names and can detect

1 Like

Hey @ppr

Thanks!!

Can you please help me to find the CPV code first then on top nodes we have contact body of that CPV code to this we need to extract

Can you please guide me

grafik
for starter help
in case of you need further help let us know exact details and element name, which are to extract.
contact body is not a valid element name.

Maybe you are looking for

so an addtional namespace is to declare and to use

Hi @ppr

I mean to say once we found the CPV code we need to extract all elements values under the contract body and put in the excel files this is what am looking for.


I think this information is enough for you i guess

have a look here as with some small adoptions you can start to implement it

Yeah i will start with this thanks…
one more thing u have mentioned to use two name spaces i have created new name space variable but how to use both?

Can you please help me on this am not able to retrieve the contact body am getting this
Log Message: Sequence contains no elements

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.