I’m reading a text file which has XML contents
I mean it is XML file saved with .txt extension for readability.
I have to read only some parts of the whole file.
Does any one know how to clean the XML file for the desired contents?
A good pattern here in the forum is: showing input (is done above), giving expected output sample with a clear description and then we can setup a individually solution approach very fast.
with the UiPAth.WebAPI.Activities Package we do get some activities to read in XML text into a so called XDoc. With the methods from System.Linq.XML namespace we can use several methods for XML Processing:
In your case you want to remove the header/Prolog and 1 tag. Still same recommendation: Can be done the regex replace.