Issue with XML and "Reading Text File" activity

Scenario: I am trying to read an XML file with approx 1000 lines, using the Read Text File activity. Then i will use Deserialize XML activity to extract information from the XML file.

Steps to reproduce: Create a sequence with the read text file activity, and use a XML document with 1000 lines or more.

Current Behavior: I get an error saying:

Issue1

Expected Behavior: Read the XML file and be able to extract data from the file

Studio/Robot/Orchestrator Version: 2017.1.6435

Last stable behavior:
Last stable version:
OS Version: Windows 7
Others if Relevant: (workflow, logs, .net version, service pack, etc):

1 Like

Edit: Problem solved!

How did you solve it? I get the same thing

When the xml file is larger than an certain no. of characters you are not able to use debug in uipath, but if you use «Run» the workflow runs. Apparently there are som limitations to the debug function…

Makes sense. My file is 75mb. Kinda stinks that it blows up on this because I needed the debugging. Thanks

What is the solution to this? I am trying to parse response from a GET request through deserialize XML, and getting the same error.

The solution is to run the workflow, instead of using the debugger. The debugger can only handle a certain number of lines in the xml file. I don’t know if UiPath intend to fix this issue.

Hi,

I’ve had similar issues with large XMLs. My workaround was to divide it and/or remove useless elements from the file.
I did it while it was in string format, for example: myXMLText.Remove(IndexOf(“< ElementToStartRemove >”).

br,
Topi

Thanks for your response! I think I will be able to use split string to my use.
If I want to split the string after every “/result>”, how do I find out the number of result sets to store the result sets in a variable array?

If you use for example:
resultSetsArray = xml.Split({“/result>”}, StringSplitOptions.RemoveEmptyEntries)
It will store them in an array, .Count would then give you the amount of sets you have in this case.

br,
Topi

Hi,
I was able to complete and test that, but the moment the size increased further it failed.
So, the split string is also not working… It still has to split a large XML string to proceed and the execution is failing right at that step.

Is there any other solution to this?

I have further modified my config file as follows, as per the suggestion from UiPath Community:

This, however, changed nothing still. Where is the issue here?