Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Converting a very flat simple xml to hierarchy xml Converting a very flat simple xml to hierarchy xmlTo: NULL Date: 5/1/2007 9:19:00 PM
Been trying for a long time to make this work. Here's my starting xml:
<root>
<a>top 1</a>
<b>b 110</b>
<b>b 111</b>
<b>b 112</b>
<c>c 11</c>
<b>b 120</b>
<b>b 121</b>
<c>c 12</c>
<b>b 130</b>
<b>b 131</b>
<b>b 132</b>
<b>b 133</b>
<c>c 13</c>
<b>b 140</b>
<c>c 14</c>
<a>top 2</a>
<b>b 210</b>
<b>b 211</b>
<b>b 212</b>
<c>c 21</c>
<b>b 220</b>
<b>b 221</b>
<c>c 22</c>
</root>
And here is the xml I want to end up:
<root>
<a>top 1
<c>c 11
<b>b 110</b>
<b>b 111</b>
<b>b 112</b>
</c>
<c>c 12
<b>b 120</b>
<b>b 121</b>
</c>
<c>c 13
<b>b 130</b>
<b>b 131</b>
<b>b 132</b>
<b>b 133</b>
</c>
<c>c 14
<b>b 140</b>
</c>
</a>
<a>top 2
<c>c 21
<b>b 210</b>
<b>b 211</b>
<b>b 212</b>
</c>
<c>c 22
<b>b 220</b>
<b>b 221</b>
</c>
</a>
</root>
I've tried a lot of things. It's hard to move the c element up to be a
parent of b.
Thanks if anyone can figure it out :)
Craig
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
