List Editor

Contact: Chris Lovett

This simple ASP application XML-based List that provides an editable list view on any XML file (on the same Web server) so long as that XML file is a simple list, and contains a special kind of simple inline schema that describes the shape of the list items.  Then a nice easy to use user interface is built on top using IE 5.x DHTML.

Example XML: /listeditor/example.xml

Editable Version/listeditor/edit.asp?file=example.xml

Readonly Version/listeditor/browse.asp?file=example.xml

Download Sourceslisteditor.zip

The User Interface

You can sort the columns by clicking on the column headings.  You can select a subset of rows to display by entering some filter expression.  For example, if you enter "parse" and press tab, you will see all items that contain the word "parse" somewhere in the text of the item.  You can also customize the view by selecting which columns you want displayed. The richer your schema, the more interesting your view becomes. All of this user interface so far is done with no round trips back to the server, which is a good way to offload cycles from your poor overworked Web servers.

You can make changes by first selecting a row, and then selecting the cell that you want to edit.  Either an edit box or a drop-down list box will appear. You type in your changes and then click outside the edit box to see your changes incorporated in the list.  When you are done, click the SAVE button. Your changes will be sent back to the server to be merged into the master document on the server in an optimistic concurrency fashion.

If you try to update the same cell as someone else at exactly the same time, your update may  fail—in which case the save process will report a conflict.  You will then have to click the SYNC button and resolve the conflict before saving again. This happens rarely because the updates are at a cell level, not a row level.

Then there is a "polling" feature so that you can see other user's updates automatically.  At the bottom of the window, a polling interval input box defines the number of seconds between polling events.  When this polling value is nonzero, the page will ping the server asking for updates at the specified interval. As other users make changes, those changes are highlighted in your browser automatically, resulting in a live collaborative environment.

You can  also edit the schema by clicking the Edit Schema button at the bottom of the list.  In the schema you can do the following things:

See also Edit.ASP Usage.

See also SchemaEditor.asp Usage

Technical Documentation

This MSDN article ListEditor: A Useful XML Web Service shows goes into detail on how this application works.

Change History

Date Description
8/28/01
  • Fixed bug in timestamping that caused updates to display even though you had the latest file already
  • Made it easier to send updategrams progromatically.
  • Fixed bug in insert before so it works properly
  • Added 2 new keys, F2=save and F12=insert so you don't have to scroll to the top buttons all the time
2/23/01
  • Added DUP button
  • Added up/down arrow support
  • Fixed bug in removing attribute columns
  • Fixed bug in editing attribute columns
  • Improved help
4/15/00 Initial Version