RPA Developer-Level 1 Assignment question.Convert the xml to String

Hello there.

I’ve got a problem when i am doing my assignment of RPA Developer Level 1. Dectect and translate language…

i got the response from detect language as a xml format as below:

Hello

I tried to use json format and convert it. but i failed …then i have to use jave code to convert it…

Any one would like to share me how i can just get the lanugage code from the reponse?

====================================================================================


${statement}

6254b49eb996453b87c1696bde56ecca

<script ><![CDATA[
	
	int index = translateResponse.toString().indexOf('>');
	int index_2=translateResponse.toString().indexOf("<", index+1);
	translateResponseFormat = translateResponse.toString().substring(index+1, index_2);
]]></script>
 
<export include-original-data="true">
		<single-column name="language_val" value= "${translateResponseFormat}" />
</export>

You’ll have to parse the XML.