[Home] [By Thread] [By Date] [Recent Entries]

Subject: flat xml tree to indent one
From: Matthieu Ricaud-Dussarget <matthieu.ricaud@xxxxxxxxx>
Date: Tue, 21 Dec 2010 13:30:08 +0100
Hi all,

This is a grouping question one more time.

For such an input :

<p foo="foo_att" bar="bar_att" foobar="foobar_att">my text</p>

I'd like such an output :

<p>
<foo><bar><foobar>my text</foobar></bar></foo>
</p>

the order foo/bar/foobar isn't important here.
<foobar><bar><foo>my text</foo></bar></foobar> would also be ok.

This should work for any number of attributes (including none)

I can't see a elegant and generic solution right now,
any suggestions would be welcome,

Matt.

--
Matthieu Ricaud
IGS-CP
Service Livre numirique

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member