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 15th, 2006, 08:14 PM
Dia Dia is offline
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Flat XML to tree

I have this flat XML file goes somethign like this
<item id='A'>
    <name>AA</name>
    <related>B</related>
    <related>C</related>
</item>
<item id='C'>
    <name>CC</name>
</item>
 and so on and so forth. I don't know how many nested items can exist, so I need to write a universal code to check for ids and see if they are in the related fields. I have been stuck in endless loops for now. Any suggestions? A sniplet would be appreciated. Thanks



 
Old November 16th, 2006, 05:11 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

It would be useful to have some idea of what output you are trying to produce. At present it's not clear what exactly your problem is. It might also be useful to see your endless loops - it's hard to see where people have gone wrong if they don't show you their code.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help in making a FLAT xml to a structured xml shlomi XSLT 0 July 19th, 2007 07:58 AM
tree xml to flat xml whiteadi XSLT 2 November 14th, 2006 02:36 PM
Flat XML structure to a tree by XSLT Borg0011 XSLT 2 July 9th, 2006 08:58 AM
flat XML to hierarchical XML eduijs XSLT 1 April 28th, 2006 05:43 AM
translating a flat xml to a hierarchical xml stevea XSLT 4 June 13th, 2005 05:55 PM





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