Guest User

Untitled

a guest
Jun 24th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. <node type="SPDependencies" Name="SPDependencies">
  2. <node type="StoredProc" Name="SP1">
  3. <node type="OperationType" Name="Type1">
  4. <node type="TableName" Name="Table1"/>
  5. <node type="TableName" Name="Table2"/>
  6. </node>
  7. <node type="OperationType" Name="Type2">
  8. <node type="TableName" Name="Table1"/>
  9. <node type="TableName" Name="Table2"/>
  10. </node>
  11. .....
  12. </node>
  13. <node type="StoredProc" Name="SP2">
  14. <node type="OperationType" Name="Type1">
  15. ...
  16. ...
  17. </node>
  18. </node>
  19.  
  20. <SP1>
  21. <Type1>
  22. <Table1>
  23. <Table2>
  24. <Table3>
  25. <Type2>
  26. <Table1>
  27. <Table2>
  28. <Table3>
  29. <SP2>
  30. <Type1>
  31. ........
  32.  
  33. <Window.Resources>
  34. <HierarchicalDataTemplate DataType="node"
  35. ItemsSource="{Binding XPath=node}">
  36. <TextBox Width="Auto"
  37. Text="{Binding XPath=@Name, UpdateSourceTrigger=PropertyChanged}" />
  38. </HierarchicalDataTemplate>
  39.  
  40. <XmlDataProvider
  41. x:Key="xmlDataProvider"
  42. XPath="node" Source="C:Data.XML">
  43. </XmlDataProvider>
  44. </Window.Resources>
  45. <Grid>
  46. <StackPanel>
  47. <Button Click="Button_Click">Save</Button>
  48. <TreeView
  49. Width="Auto"
  50. Height="Auto"
  51. Name="treeview"
  52. ItemsSource="{Binding Source={StaticResource xmlDataProvider}, XPath=.}"/>
  53. </StackPanel>
  54. </Grid>
  55.  
  56. XmlDataProvider dataProvider = this.FindResource("xmlDataProvider") as XmlDataProvider;
  57. dataProvider.Document.Save(dataProvider.Source.LocalPath);
Add Comment
Please, Sign In to add comment