1
我有下表。亲子表xml
id name parentid
----------------
1 root null
2 child A 1
3 child B 2
4 child C 1
有人能指出我在这个导出到XML在C#或SQL服务器同时支持层次朝着正确的方向?
<node>root</node>
<children>
<node>Child A</node>
<children>
<node>Child B</node>
</children>
<node>Child C</node>
</children>
发布你想要的输出xml的样子,和确切的表ddl – amdixon
请看上面的评论,提前谢谢你。 – Mardo
建议在节点元素中嵌套子标记,否则xml不会存储这种关系,也应该导出标识(也许作为属性) – amdixon