Listing 1 – XML Editor View
Steps for editing XML File
Even though the functionality of the page is evident from
the screenshot, the process of editing the XML file is described below.
The path of the XML file is provided in the XML File Path
TextBox. (In the source code, the path ~/App_Data/Book.xml is hardcoded. This
file is available in the same directory with the source code.)
Clicking the Load File button will load the TreeView Control
with the XML file via an XmlDataSource object.
When the user clicks on a particular node of the TreeView
Control, the InnerXML of the node is loaded in the TextBox on the right side.
Now the user can edit the XML as required.
Clicking on the Save Button will save the XML file.