xsl-list
[Top] [All Lists]

Re: [xsl] From filepaths to XML hierarchy

2011-12-27 08:03:11
Seems similar to this question which I answered recently on SO:



http://stackoverflow.com/questions/8620090/auto-creating-xml-template-based-on-string-pattern-using-xslt/8623217#8623217



On Tue, Dec 27, 2011 at 5:25 AM, Jesper Tverskov 
<jesper(_at_)tverskov(_dot_)dk> wrote:

Hi List

How can I transform a list of filepaths into a consolidated XML hierarchy?


Let us reduce the problem to the following input file:
<x>
  <a><b><c/></b></a>
  <a><b><d/></b></a>
  <a><b><e/></b></a>
  <h><i/></h>
  <h><j/></h>
</x>

How can I transform it into the following output:
<x>
  <a><b><c/><d/><e/></b></a>
  <h><i/><j/></h>
</x>

Cheers
Jesper Tverskov

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>