开发者

How to format the xml?

Hi I have an xml 开发者_开发知识库like below

<Root><First><id></id></First><Second><a>a</a><b>b</b></Second></Root>

I have to format it into

<Root><First><Second><a>a</a><b>b</b></Second><id></id></First></Root>

can any one tell me how to do this in c# 2.0. ?


It's pretty simple using XML transformation, I think if you do something like this would work: http://www.logiclabz.com/c/net-c-function-to-convert-xml-document-into-html-string-using-xslt.aspx

If don't know this, I think you have a great opportunity to learn it with you problem - it's very powerful!


Try using DOM to transform the nodes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜