Deserialize XML: Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 3 Position 12695

Hello,

I am facing issues while deserializing XML, getting an error Deserialize XML: Name cannot begin with the ‘<’ character, hexadecimal value 0x3C. Line 3 Position 12695

any guess?

Here I have the input:

HI,

Can you share your xml string as file, if possible?

Regards,

Do you need the file as the Same Screenshot?

HI,

I’ll try it in my environment if you can provide it as text file (xml file).

Regards,

I am getting this info from the log, how to download XML file?

Hi,

Can you try to use WriteTextFile activity just before deserialize?

image

Regards,

1 Like

Okay, Let me check and give you

I am not able to follow the above steps to Deserialize, here is my txt file.
36.txt (1.9 KB)

Please check and assist

HI,

There is an extra string at the beginning of the data : "Request: ".

image

It’s necessary to get rid of it using the following expression, for example.

strXml  = System.Text.RegularExpressions.Regex.Replace(strXml,"^[^<]*","")

Sample20230324-6L.zip (2.9 KB)

Hope this helps you.

Regards,

I think the Request they placed as log Label, let me check the source code to get XML output .

HI,

It seems no problem if get rid of "Request: " as the following image.
Can you also try the above sample project?

Or is the xml file from WriteTextFile actiivty?

Regards,

Sure i will try and let u know, thanks for your quick response.