Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0
This is the forum to discuss the Wrox book XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition by Michael Kay; ISBN: 9780470192740
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 10th, 2014, 02:00 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Group elements to new parent node

Hi there, I'm beginner learning xsl and I need help with xsl file to transform my original xml which looks like

Code:
<pod>
  <id>1</id>
  <mfp>
    <type>1</type>
    <val>10</val>
  </mfp>
  <mfp>
    <type>2</type>
    <val>12</val>
  </mfp>
  ....
</pod>
And I need to have new node MFPS which contain all mfp elements, like

Code:
<pod>
  <id>1</id>
  <MFPS>
    <mfp>
      <type>1</type>
      <val>10</val>
    </mfp>
    <mfp>
      <type>2</type>
      <val>12</val>
    </mfp>
  </MFPS>
</pod>
<pod>
<id>2</id>
<MFPS>
<mfp>...</mfp>
</MFPS>
</pod>...

Please help me how to solve this. Thanks

Last edited by timmy013; February 10th, 2014 at 02:03 PM.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT logic for repeating child elements within parent node Srinibondugula BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 5 November 8th, 2011 12:05 PM
Displaying data as a Parent Node with Left Node and Right Node Manoj Bisht Visual Basic 2008 Professionals 0 April 2nd, 2009 03:34 AM
Pickingup sub elements from its parent vikkiefd XSLT 5 March 14th, 2008 11:29 AM
Finding parent node Chamkaur XSLT 4 August 9th, 2006 07:26 AM
Saving the parent node Doyle Bradely XML 2 December 23rd, 2003 07:05 PM



All times are GMT -4. The time now is 02:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.