ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:    
Ambiera Forum > irrXML
storing data of unknown type...configurable xml files
Author Text

2010-09-22 20:23:35

I currently working on a data management project in which I want the end user to be able to setup a database. Specifying categories, elements in each category, and properties/attributes of each element. It needs to be configurable so that at any time they can change what data is stored for each element. For instance. Lets say the database is for asset management. They might need categories for Stocks, bonds, Savings accounts, and property. Stocks would need to know they company name, current stock price, etc. Property would need a name/label for the property, address, buying price, current market value, etc.

At some point the user might need additional information for lets say properties, such as the date purchased. I need to be able to enable the user to edit (via a gui, not xml) the database info at anytime and make changes as needed. The Interface part is handled. My question is how to acquire and store information in an xml file in memory when me, as the coder, dont know what type of information can be entered.

I have thought about having irrxml parse config.xml for instance. The config file is read and each element being a category name, then each sub element (or attribute) in each category would be a property of that category. like...

<Stocks stockName="" stockPrice="" />
<Propertys propName="" propPurchaseDate="" propBuyValue="" />

then I would need an xml file for each category

<!--stocks information -->
<stock1 stockName = "Dow Jones" stockPrice = "55.10" />
<stock2 stockName = "Disney" stockPrice = "34.15" />

and so on. What my concern is that the readers "read" function changes the values in the reader Node to whatever the next node is, so how can I go about creating a database in memory to know what categories there are without knowing the categories and other information at compile time? Additionally, is there a node structure or class that I can use in a vector array or something that would allow me to parse the file, store the current node info in some local structure, then add it to the array? Keep in mind, that one user might need 5 categories and have a variable amount of information in each category but another user might only need 2 categories and less information (or more) for each.

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Inte?national" (you are not logged in)




Forum Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



Software: Ambiera Light Forum. © 2008-2018 Nikolaus Gebhardt, Ambiera e.U.