How to Store data without using Database and how to retrieve them?

前端 未结 8 905
小鲜肉
小鲜肉 2020-12-11 08:10

I am parsing the html file to extract tabular information through column names. And I want like let user give the input for column name. And according to that column names t

8条回答
  •  执笔经年
    2020-12-11 09:13

    If you've got-to-choose but a database; then I'd go with Xml, use SAX to parse when file goes larger.

    See how to Manipulate XML File Data Using C#

    --EDIT--

    This is in response to your comment. Lets assume that you have a screen with following controls:

    1. TextBox as txtColumnName; when user provides a column name and click on the add button, save it as an xml attribute.
    2. ComboBox as cbxColumns; select the current column
    3. TextBox as txtValue; when this is provided then save the value in the column selected in the Columns combo.
    4. Add Button; you can add delete, update buttons as well.

    Please go through the example link, it would help you add/remove/update nodes at runtime. You can comeup with your XmlDatabaseWrapper class that would wrap around all of the CRUD operations.

提交回复
热议问题