Dynamic XML parsing, data storage, and forms in c# -


so developing application want able dynamically parse xml file, grab attributes , populate form created based on elements present in xml file. values can edited, , written xml file opened.

i've been able parse, save values database , populate forms, , write original xml file via hard coding, , think have idea dynamic "database" structure (a dictionary key node's name, , value dictionary if wanna store node's child node information, or string if i'm in furthest nested child node of element).

i'm stuck on how grab information need , how store in "database" structure i've come with. i've done research , have seen people use "dynamic" object , linq. i've seen seems involve knowing path names they've needed before run time. ideas on how should going parsing file , grabbing data, first off? think if can figured out, rest should kind of fall place.

say have xml

<users> <user1 age="43">john doe</user1> <user2 age="40">jane doe</user2> </users>

an example database setup dictionary<users, dictionary<user1, dictionary<name,john doe>

where go key("users").key("user1").key("name").value john doe or that.

any other suggestions database setup appreciated

you parse xml using xmldocument class. after parsing have tree of nodes can traverse , show in ui. don't understand why want save xml distinct records of values in database, save text. anyway saving xml should translate records xml.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -