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 November 19th, 2014, 02:10 PM
Registered User
 
Join Date: Nov 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default xslt code to convert string to nodes using delimiter (( . and ,

How do i convert string values in the below xml to nodes in output xml using xslt

input.xml
<root>
<AuthorDetail>Author:Joe Brown.Books.1st Editions</AuthorDetail>
<Details>Book((Autobiography,The Life Story.300 pages),
(Chapter1,Birthday.50 pages),
(Chapter2,Youth.150 pages),
(Chapter3,The End.100 pages)),
Book((Friction,The Another Story.400 pages),
(Chapter1,Happy Days.250 pages),
(Chapter2,Sad Days.150 pages))
</Details>
</root>


Output xml Required
<Joe Brown>
<Books>1st Editions</Books>
<Book>
<Autobiography>
<The Life Story>300 pages
<Chapter1><Birthday>50 pages</Birthday></Chapter1>
<Chapter2><Youth>150 pages</Youth></Chapter2>
<Chapter3><The End>100 pages</The End></Chapter3>
</The Life Story>
</Autobiography>
</Book>
<Book>
<Friction>
<The Another Story>400 pages
<Chapter1><Happy Days>250 pages</Happy Days></Chapter1>
<Chapter2><Sad Days>150 pages</Sad Days></Chapter2>
</The Another Story>
</Friction>
</Book>
</Joe Brown>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Create nodes from string varaible Ahly_Bayern XSLT 2 March 31st, 2011 07:29 AM
Merge nodes using xslt himanshu XSLT 5 September 2nd, 2010 06:40 AM
XSLT 1.0: Looping through nodes kwilliams XSLT 4 December 1st, 2008 06:21 PM
code of convert xml data type in string by C# prafullaborade XML 2 May 24th, 2008 07:49 AM
Removing nodes with an XSLT Jza XSLT 2 April 19th, 2006 10:06 AM





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