How to get the word in xml code?


Hi everyone! I need your help.
I want to get “Guest” information in my xml document. How can I get it?
Note:
-My Guest value is constantly changing.
-I convert my xml path to json path.

Hi @ozgecatak

Welcome to Uipath community

Have a look on it

Go through this it might be helpful

Regards
Gokul

Hi Gokul,

First of all thank you for your return. But I could not get it.
In my project, firstly I use XML to Json activity than I read json path and deserialize json. After that I start reading my invoice informations. For example, total cost, tax, issue date etc.

A part of my project, I get notes with this. assign noteList = jsonara(“Invoice”)(“cbc:Note”).ToList

noteList=

image

Now, I want to get Guest informations but I couldnt. Can you help me?

Hi @ozgecatak

Can you share the sample XML file here.

for getting the value of cbc:note element the xml namespace is to handle:

from the value we get the Guest value by

Deserializaton of the JSON into a JObject - myJObject

strGuest = myJObject(“Guest”).Value(Of String)

image
I get this error.

show us what you have implemented so far. Thanks

Unfortunately, it is about my job.

My code is true because I get another information from invoice correctly.
As you see below, My jobject name is " jsonara "

image

I get cbc:note as a List

image

Than, I fix my list

image

Finally,

As you decided to go with the approach of XML-to-JSON for the XML handling we suggest:

  • debug your code and find the location where it is breaking with the code / null
  • prototype the fix / code within the immediate panel

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum