[XML Records] Working of XMLtoRecordList

[XML Records] Working of XMLtoRecordList

  
Forge Component
(30)
Published on 5 Feb by Afonso Carvalho
30 votes
Published on 5 Feb by Afonso Carvalho

Hi.

I'm trying out this component. I am unable to figure out how to use it.

Right now, I'm taking the output of the REST call as input of XMLtoRecordList, and using a ToObject(SomeLocalVariable). The type of the local variable is the structure where I want to store this data. But I'm getting the following error:

Parameter 'RecordList' must be a valid RecordList of Records of the type that you want to deserialize.

How do I fix it?

Hi Saurav,

You have to make your structure in a nested way according to output of your xml.

Structure of record or record list according to whatever your xml output.

Sachin


Hi Saurav,

For XML Records to be able to store the output, you have to supply it with a Record List. So not a List of type, or a Record or a variable of a type. Please let us know if you do not know how to create that.

Saurav Sircar wrote:

Hi.

I'm trying out this component. I am unable to figure out how to use it.

Right now, I'm taking the output of the REST call as input of XMLtoRecordList, and using a ToObject(SomeLocalVariable). The type of the local variable is the structure where I want to store this data. But I'm getting the following error:

Parameter 'RecordList' must be a valid RecordList of Records of the type that you want to deserialize.

How do I fix it?

Hi Saurav, Please have a look at sample(attached), It will help you to understand how to convert xml to recordlist.

Sachin


This was very helpful to me, it works like a charm as long as you don't have different namespaces in the xml. Can you provide an example for this? I can attach an example XML that I would like to be able to read.