读书人

如何生成一个树型结构的XML文件

发布时间: 2012-01-01 23:10:55 作者: rapoo

怎么生成一个树型结构的XML文件?
UserID ChildID ParentID
1 1 null
2 2 1
3 3 1
4 4 2
5 5 2


数据库的结构是这样的,我现在怎样才能写成一个树型结构的XML文件啊?

[解决办法]
select sys_connect_by_path(parentID, '/ ') || '/ ' || childID
from userTable
start with parentID is null
connect by parentID = prior childID
[解决办法]
then generate the xml file by the selected result
[解决办法]
代范例可以照:http://www.codeproject.com/aspnet/SquaredRomiss.asp

读书人网 >asp.net

热点推荐