How to read Xml Data File in Ui Path

How to read Xml Data File in Ui Path and How to search particular Elements are values there are not in xml file if it is not thers some values writing in xml file .

If it is Possible
Let me Know.

@Logesh_Kumar,

Welcome to our Community!.

Check this custom activity, implementation guidelines will be there in the portal.
https://go.uipath.com/component/xml-conversion-activities

Hi sarathi125 sir,
I am not converting Xml to datatable or csv I want Read That Xml File and find the Elements values in xml

Hi @Logesh_Kumar

Welcome to our community!

Go through this it might be helpful

Hi prakaz25 sir,

image

Next I need to search from Xml so what to do

go through this thread Read XML files and get data - Namespaces

You can access value from xml like
getxmloutput.element(“name”). tostring
If structure is nested then
Getxmloutput.element(“root”). element (“child”). element (“name”). tostring

Hi sandeep13 sir,

Getxmloutput.element(“component”). element (“header”). element (“publicationMeta”). element (“publisherInfo”).tostring
Message Box: Object reference not set to an instance of an object.

How can i solve this sir

could you share xml file or screenshot?

Hi sandeep13 sir,
Find Below Attachment

cft2cftm20140013.xml (84.2 KB)

try this

Getxmloutput.element(“component”). element (“header”). element (“publicationMeta”). element (“publisherInfo”).value

Hi sandeep13 sir,

image

Message Box: Object reference not set to an instance of an object.

@Logesh_Kumar


its works but when i remove addtional value from xml file
like

Hi sandeep13 sir,
Thank You sir,
But My Requirement

xmlns:wiley=“http://www.wiley.com/namespaces/wiley/wiley”
This Component tag have this to i search if this sentence hear no problem if not hear means i put that text i replace that text

If I check The Component tag have that text if not have i put that text
xmlns:wiley=“http://www.wiley.com/namespaces/wiley/wiley”

Hi sandeep13 sir,

How to find the type value and sort values in title element

@Logesh_Kumar
using Attribute method
XMLDoc.Element(“component”).Attribute(“Title”).ToString

Hi sandeep13 sir,

I try many, but coming Errors,

getXmloutputTxt.Element(“titleGroup”).Element(“title”).Attribute(“sort”).ToString
getXmloutputTxt.Element(“titleGroup”).Attribute(“title”).ToString
getXmloutputTxt.Element(“component”).Attribute(“Title”).ToString

@Logesh_Kumar

i print level attribute of publicationMeta element
XMLDoc.Element(“component”).Element(“header”).Element(“publicationMeta”).Attribute(“level”).Value

@Logesh_Kumar

it’s working but as i said i remove additional value

XMLDoc.Element(“component”).Element(“header”).Element(“publicationMeta”).Element(“titleGroup”).Element(“title”).Attribute(“type”).Value

Hi sandeep13 sir,
Now it’s working Fine
That Attribute Value I replace The Text How