cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic generation of tags

Former Member
0 Kudos

Hello All,

I have requirement something like this.

My scenario is file to file. Right now my sender is going to have just 20 fields which i need to pass to target on some condition. But in near future its going to increase upto say 100. Is there any ways that i can dynamically generate this tags? in addition to this requirement, my receiver will have tag names as per whatever is getting passed from Sender as a value.

As per example:

this is my mapping rule:

/pr:Feed/Data/Products/Product/AttributeValues/AttributeValue/@AttributeName[AttributeName="ABC Supplier ID" and language="en-US" and isGlobal ="true"]

then generate tag name as "ABCSupplierID". This is going to be my receiver tag name.

So at dynamic time my receiver tag name is going to be generated.

Is there a way to do it like this?

Is XSLT mapping helpful in this?

Thanks,

Hetal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

requirement changed, and had to go with hardcoding the field names.

sunil_singh13
Active Contributor
0 Kudos

Hetal,

I would suggest you to use Java Mapping. have two variable to create a field and its value dynamically.

Thanks,

Sunil Singh

VijayKonam
Active Contributor
0 Kudos

May be you can define the data type with field name and field value repeating and map them as target in the mapping. In an adapter module, you can extract each pair and create the final dynamic XML tags based on field names and tag values based on field value.

Just an alternative.

VJ