Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2015, 04:40 PM
Registered User
 
Join Date: Mar 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Copy xml element content to another

Hello.

I need your help. I want to copy an XML element content to another empty element content using XSLT.

Input:

<library>
<book>
<title>Programming</title>
<author>Fernando Redondo</author>
</book>
<magazine>
<title>TAMIYA TOURING CAR</title>
<type></type>
</magazine>
</library>

Output:

<library>
<book>
<title>Programming</title>
<author>Fernando Redondo</author>
</book>
<magazine>
<title>TAMIYA TOURING CAR</title>
<type>Programming</type>
</magazine>
</library>

The idea is to copy <title></title> content to <type></type>.
How is it possible using XSLT?, I can´t find the way to solve it.

Thanks a lot for your help.





Similar Threads
Thread Thread Starter Forum Replies Last Post
copy-of without the element tag 4everJang XSLT 1 January 7th, 2014 11:07 AM
need to output the content of an element with out the content of it's children tonypg XSLT 2 May 3rd, 2012 07:30 AM
How to copy new element at child level dishant XSLT 1 January 13th, 2012 03:24 AM
Identify element based on the element data/content ROCXY XSLT 7 September 8th, 2011 02:48 AM
XSLT output to HTML - xml element text should look exactly as laid out in xml element DjGogga XSLT 4 July 21st, 2011 05:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.