/*
This sample will help you to parse Tree View XMl of Explicit format.
If you Apply Cross Apply on for Outer Apply then it will not display the child which does not have 3 Levl
If you store this XML in to temp table then you can update the Parent child clasification in to table.
*/
-- Please Replace [ and ] by < and >
DECLARE @HierarchyDetail XML
SET @HierarchyDetail =
'[treeview]
[treeview-nodes]
[treeview-node node-text="Account -1001" node-value="1001"]
[treeview-nodes]
[treeview-node node-text="Account -1075" node-value="1075"]
[treeview-nodes]
[treeview-node node-text="Account - 1132" node-value="1132" /]
[/treeview-nodes]
[/treeview-node]
[/treeview-nodes]
[/treeview-node]
[treeview-node node-text="Account - 1000" node-value="1000"]
[treeview-nodes]
[treeview-node node-text="Account -1077" node-value="1077"]
[treeview-nodes]
[treeview-node node-text="Account -1134" node-value="1134" /]
[/treeview-nodes]
[/treeview-node]
[/treeview-nodes]
[/treeview-node]
[treeview-node node-text="Account - 1080" node-value="1080"]
[treeview-nodes]
[treeview-node node-text="Account - 1101 " node-value="1101"]
[treeview-nodes]
[treeview-node node-text="Account - 1135" node-value="1135" /]
[/treeview-nodes]
[/treeview-node]
[/treeview-nodes]
[/treeview-node]
[treeview-node node-text="Account - 1114" node-value="1114"]
[treeview-nodes]
[treeview-node node-text="Account - 1124 " node-value="1124"]
[treeview-nodes]
[treeview-node node-text="Account - 1137" node-value="1137" /]
[treeview-node node-text="Account - 2937 " node-value="2937" /]
[/treeview-nodes]
[/treeview-node]
[/treeview-nodes]
[/treeview-node]
[/treeview-nodes]
[/treeview]'
Friday, August 27, 2010
Subscribe to:
Posts (Atom)