Can anyone help with getting only text tag value from an XML file?
newFile.xml (1.7 KB)
Can anyone help with getting only text tag value from an XML file?
newFile.xml (1.7 KB)
Hi @Arun_Pondhe
You can explore this compents I think it might be helpful to you.
https://go.uipath.com/component/xml-conversion-activities
cheers
Happy learning
@pattyricarte do you have any example??
Kindly have a view on this thread
Cheers @Arun_Pondhe
Hi @Arun_Pondhe,
You can use this pattern to extract the text from the text tag.
(?<=<text.*>)\S.+(?=</text>)
I’m attaching the workflow for your reference. ExtractTextTagValue.xaml (6.4 KB)
Please marked it as solution if it helped you.
What is Note in if else condition is it tag name
Yah instead of that you can replace with your tag name
Cheers @Arun_Pondhe
Did we change the type argument in the for each loop activity that is change the type to xelement type by selecting browse types in the property panel
And try once
Cheers @Arun_Pondhe
@Arun_Pondhe
ensure your XML is valid. I had a look on your provided sample and it is invalid in its structure and syntax.
I would suggest to correct it first, before setting up the retrieval part.
How to convert that XML into correct format is any way there
@Arun_Pondhe
manually correction is needed. Online/Toolbased validation of the corrected XML is recommended as well.
can you help me to make xml in proper format
Yes I can have a look on it later on my afternoon as I will travel.
In the meanwhile please specify in detail what do you want to rtrieve from the XML. Thanks
page1.xml|
attachment (18.0 KB)
I want to retrieve only inside the information between text tag
@Arun_Pondhe
the last attached page1.xml was ok as <pdf2xml element was even closed on the end
PFA demo sample
Arun_Pondhe.xaml (9.5 KB)
running standalone and showcasing following:
Please ensure following:
adopt the xaml to your correct XML FilePath
the XML/Linq references are imported
Let us know your open questions and flag the solution post. Others can so benefit from.