EDN Admin
Well-known member
Hello,
I want to construct the XML tree back from the paths which i have in the file.
<span style="text-decoration:underline The paths in the text file are:
/R<br/>
/R/A/A<br/>
/R/A/C<br/>
/R/A/C/A<br/>
/R/A/C/C<br/>
/R/A<br/>
/R/A/A/C<br/>
/R/A/C/D<br/>
/R/B<br/>
/R/B/B<br/>
/R/B/A<br/>
/R/A/C<br/>
/R/B/B/C<br/>
/R/B/B/D
The paths can be in any order, one path in one line of the text file.
And i want to get the XML out of these paths.
<span style="text-decoration:underline The desired result is below XML:
<R><br/>
<A><br/>
<A><br/>
<C></C><br/>
</A><br/>
<C><br/>
<A></A><C></C><D></D><br/>
</C><br/>
</A><br/>
<B><br/>
<A><br/>
</A><br/>
<B><br/>
<C></C><D></D><br/>
</B><br/>
</B><br/>
<A><C></C></A><br/>
</R>
Thanks.
Please help me get C# code to do that.
View the full article
I want to construct the XML tree back from the paths which i have in the file.
<span style="text-decoration:underline The paths in the text file are:
/R<br/>
/R/A/A<br/>
/R/A/C<br/>
/R/A/C/A<br/>
/R/A/C/C<br/>
/R/A<br/>
/R/A/A/C<br/>
/R/A/C/D<br/>
/R/B<br/>
/R/B/B<br/>
/R/B/A<br/>
/R/A/C<br/>
/R/B/B/C<br/>
/R/B/B/D
The paths can be in any order, one path in one line of the text file.
And i want to get the XML out of these paths.
<span style="text-decoration:underline The desired result is below XML:
<R><br/>
<A><br/>
<A><br/>
<C></C><br/>
</A><br/>
<C><br/>
<A></A><C></C><D></D><br/>
</C><br/>
</A><br/>
<B><br/>
<A><br/>
</A><br/>
<B><br/>
<C></C><D></D><br/>
</B><br/>
</B><br/>
<A><C></C></A><br/>
</R>
Thanks.
Please help me get C# code to do that.
View the full article