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>
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.
What would the resulting transformed XML look like?
ASKER
The resulting transform should look like this...
<?xml version="1.0" encoding="utf-8"?>
<Candidates>
<Candidate>
<FirstName><![CDATA[Nadeem ]]></First Name>
<LastName><![CDATA[Baseer] ]></LastNa me>
<blocktext>
Resume Content
Cover Letter Content </blocktext>
</Candidate>
</Candidates>
</xml>
<?xml version="1.0" encoding="utf-8"?>
<Candidates>
<Candidate>
<FirstName><![CDATA[Nadeem
<LastName><![CDATA[Baseer]
<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?
ASKER
Not the html but just the content from <resume> and <coverletter> into one field named as >blocktext>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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,