Link to home
Start Free TrialLog in
Avatar of lux sat
lux sat

asked on

XSLT CODE to transform one form of XML to another

<?xml version="1.0" encoding="utf-8"?>
<Candidates>
<Candidate>
<FirstName><![CDATA[Nadeem]]></FirstName>
<LastName><![CDATA[Baseer]]></LastName>
<Resume> Resume Content</Resume>
<CoverLetter>Cover Letter Content</CoverLetter>
</Candidate>
</Candidates>
</xml>

Open in new window


From the XML above  I need to create another XML file with fields Resume and CoverLetter into one single field using XSLT. I need the correct transform Code in XSLT.
Avatar of lux sat
lux sat

ASKER

I need help with

From the Code above.. I need to create another XML file with
1. 'Resume' and 'CoverLetter' into one field 'blocktext'
2. InterviewTypeResponses (all sub nodes into one field called Comments)

Thanks,
Avatar of ste5an
hmm, no XML, no snippet, no interview type responses...

please post a concise and complete example. Use the toolbar to embed it into code tags.

User generated image
What would the resulting transformed XML look like?
Avatar of lux sat

ASKER

The resulting transform should look like this...


<?xml version="1.0" encoding="utf-8"?>
<Candidates>
<Candidate>
<FirstName><![CDATA[Nadeem]]></FirstName>
<LastName><![CDATA[Baseer]]></LastName>

<blocktext>

Resume Content

Cover Letter Content </blocktext>
</Candidate>
</Candidates>
</xml>
Are you saying that you want to insert HTML <blocktext> with <Resume> and <CoverLetter> inner content, but not include those elements in the output?
Avatar of lux sat

ASKER

Not the html but just the content from <resume> and <coverletter> into one field named as >blocktext>
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial