tomhack 0 Newbie Poster

Hi all,
I need to transform xml --><xslt> -->xml
I have flat xml file(source file) , Need to code Xslt file to get target file.
(Files are given below)
This is source file(flat)

<CV:Hot>
<CV:Aaa style="Title">
		<b type="Aaa">Curriculum Vitae</b>
	</CV:Aaa>
	<CV:Aaa style="Subtitle">
		<b>Personal Details</b>
	</CV:Aaa>
	<CV:Aaa style="Name">Tom Hack</CV:Aaa>
	<CV:Aaa style="Nationality">Earthling</CV:Aaa>
	<CV:Aaa style="HomeTown">Earth</CV:Aaa>
	<CV:Aaa style="Subtitle">
		<b>Recent Employment History</b>
	</CV:Aaa>
	<CV:Aaa style="StartDate">08/10/2050</CV:Aaa>
	<CV:Aaa style="EndDate">01/02/2090</CV:Aaa>
	<CV:Aaa style="Job">2<super>nd</super> Hack Man</CV:Aaa>
	<CV:Aaa style="Employer">Planet X Ltd</CV:Aaa>
	<CV:Aaa style="Duty">Seek & Destory</CV:Aaa>
	<CV:Aaa style="Duty">Capturing UFO Signals</CV:Aaa>
	<CV:Aaa style="Duty">Escalating Issues</CV:Aaa>
	<CV:Aaa style="Subtitle">
		<b>Interests</b>
	</CV:Aaa>
	<CV:Aaa style="interest">Playing Games</CV:Aaa>
	<CV:Aaa style="interest">Listening UFO signal</CV:Aaa>
	<CV:Aaa style="interest">Science Fiction books</CV:Aaa>
</CV:Hot>

And this is target file "Output xml"

<?xml version="1.0"?>
<title>Curriculum Vitae</title>
	<personal_details>
		<subtitle>Personal Details</subtitle>
		<name>Earthling</name>
		<nationality>Earthling</nationality>
		<home_town>Earth</home_town>
	</personal_details>
	<employment_history>
		<subtitle>Recent Employment History</subtitle>
		<duration>
			<startdate day="08" month="10" year="2050"/>
			<enddate day="01" month="02" year="2090"/>
		</duration>
		<job>2nd Hack Man</job>
		<employer>Planet X Ltd</employer>
		<duties>
			<duty>Seek & Destory</duty>
			<duty>Capturing UFO Signals</duty>
			<duty>Escalating Issues</duty>
		</duties>
	</employment_history>
	<interests>
		<subtitle>Interests</subtitle>
		<interest>Playing Games</interest>
		<interest>Listening UFO signal</interest>
		<interest>Science Fiction books</interest>
	</interests>
	</CV>

Requirement:
I need to write XSLT file to transform from source/flat xml file to target xml file. Simple.

I am novice in writing/transforming xml using xslt. I would some of your experience and ideas or code that I can learn, understand some of your tips, tricks and techniques to write xslt.
Any help will be much more appreciated.

Thank you.
Tomheckno

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.