cancel
Showing results for 
Search instead for 
Did you mean: 

replace the character in xml tags

12-30-2016 1:20 PM
645 views 4 comments
0 Likes
SAP Managed Tags
Subscribe

Hi All,

In my receiver structure, few field names are containing "__" underscore. for example

source xml

<gdp__india>45</gdp__inida>

output xml file should be

<gdp: inida>45</gdp:inida>

i want to replace all the __ characters with :

i don't want go java code because i have to install that NWDS or eclipse tool. with that again i need to check supported java version and all.. i am facing difficulty to get those details. my version is SAP PI 7.1

is it easy if we can go to xslt mapping instead of this? if yes. can you please provide me the procedure and if there is any standard code is there for the same?

Regards,

Janardhan

0 Likes

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member207703
Active Participant
0 Likes

Hi,

Create a file-to-file scenario and create required target node names. And do one to one mapping.

Regards,

Anoop Rai

Former Member
0 Likes

Hi Evgeniy,

is there any standard code to achieve this through xlst mapping?

Regards,

Janardhan

former_member190293
Active Contributor
0 Likes

Hi Janardhan!

Yes, you can use XSLT for this.

Using contains() and local-name() functions should help you.

Regards, Evgeniy.

Former Member
0 Likes

Hi Evgeniy,

I am new to this XSLT mapping, can you please provide if there is any standard code or please guide me to achieve this requirement.

Regards,

Janardhan