Cannot parse the input xml.

  • 7 December 2022
  • 5 replies


I am not able to read variable values from an xml config file. getting error as- Cannot parse the input xml.


Need immediate assistance.


Thanks :)

5 replies

Userlevel 6
Badge +15

Could you please share the XML file or Data’s here

Userlevel 6
Badge +16

Hi @Valli SyamalaS108178 

Can you validate the xml file using XML: Validate XML document before reading the nodes this validates the given xml file does not have any issues. Checkout below documentation on XPath expression.


Hi Valli SyamalaS108178,


When you attempt to extract a value that contains an ampersand (&), you will receive the error “Cannot parse the input XML”. I have experienced the same problem when extracting a website link from an XML file.

The solution that I used was to replace the website link ampersand(&) with a unique key and then to replace it back to the original after extraction.


Userlevel 4
Badge +7

Hi @Valli SyamalaS108178 ,

That usually happens when your XML isn’t well formed, which is a fancy way of saying that it doesn’t contain all the required closing tags.

HTML isn’t so strict about these things, but XML is, so I would suggest pasting that XML here and validating it:


Its missing a closing tag for ‘heading’

This will help you validate your XML, and also its better to handle this exception within the bot as well by using the Validate XML Action and use a Error Handler: Throw to notify the dev/user that the XML isn’t well formed.

Throw is used for Business Exceptions by the way - which is also a fancy way of saying ‘error in data’.

Kind Regards,
Ashwin A.K

Userlevel 3
Badge +6

Dear @Valli SyamalaS108178,


It is possible that there is an error in the XML format of your config file. XML files need to have a specific structure and syntax in order to be parsed correctly. Some common mistakes include forgetting to close tags, using invalid characters, or including illegal attribute names.

To fix this issue, you can try opening the config file in a text editor and checking for any syntax errors. Make sure that all tags are properly closed, and that there are no illegal characters or attribute names. If you are not sure how to structure an XML file, you can consult an XML reference guide or search online for examples of well-formed XML files.

Once you have corrected any errors in the config file, you should be able to read the variable values from the file without any problems.