C# & things I can put in XML?
-
I wonder what are things I can put in XML in regular C# code, variable names maybe, guess not, but what can we use it for? Files path for resource files, or something like that, what is use of XML in regular Windows program, hope this isn't wrong room... btw? Can I put user data for example some options settings instead of con fig or registry? Can I put some user input like user list or use it like small data-base file?
-
I wonder what are things I can put in XML in regular C# code, variable names maybe, guess not, but what can we use it for? Files path for resource files, or something like that, what is use of XML in regular Windows program, hope this isn't wrong room... btw? Can I put user data for example some options settings instead of con fig or registry? Can I put some user input like user list or use it like small data-base file?
You can basically put anything you want in XML, the Extensible part of Extensible Markup Language.
only two letters away from being an asset
-
You can basically put anything you want in XML, the Extensible part of Extensible Markup Language.
only two letters away from being an asset
OK, but can someone provide some sample usage of it, sound great but have no idea what to do with it, and how it can improve my application?
-
OK, but can someone provide some sample usage of it, sound great but have no idea what to do with it, and how it can improve my application?
Have you tried searching for XML here :rolleyes:
only two letters away from being an asset
-
Have you tried searching for XML here :rolleyes:
only two letters away from being an asset
I did but there are so menu things don't know where to begin... even MSDN is very confusing on that... most articles talk about Word or SQL... don't need neither right now...
-
I did but there are so menu things don't know where to begin... even MSDN is very confusing on that... most articles talk about Word or SQL... don't need neither right now...
Then you're in teh wrong place. Go buy a book on XML and read it for starters.
only two letters away from being an asset
-
Then you're in teh wrong place. Go buy a book on XML and read it for starters.
only two letters away from being an asset
Mark Nischalke wrote:
Then you're in teh wrong place. Go buy a book on XML and read it for starters.
Almost any XML book I know of is not on specific topic like What should I do with XML in my .net C#, program or something... beside not much choice on that topic here... I'll look around on-line instead I guess...
-
Mark Nischalke wrote:
Then you're in teh wrong place. Go buy a book on XML and read it for starters.
Almost any XML book I know of is not on specific topic like What should I do with XML in my .net C#, program or something... beside not much choice on that topic here... I'll look around on-line instead I guess...
TrooperIronMan wrote:
What should I do with XML in my .net C#, program
After supposedly reading online resources such as CP and MSDN as well as books and you still can’t answer this question it's time to chose a new career.
TrooperIronMan wrote:
Almost any XML book I know of is not on specific topic like What should I do with XML in my .net C#,
If you find the book that tell you what to do for your specific project you'd better keep it secret because half the posters on CP will be bombarding your inbox wanting to know where to get a copy. Books, magazines, articles, etc. are not going to tell you what to do for your own little world, you have to do something creative, like actually think for yourself. :wtf::omg:
only two letters away from being an asset
-
I wonder what are things I can put in XML in regular C# code, variable names maybe, guess not, but what can we use it for? Files path for resource files, or something like that, what is use of XML in regular Windows program, hope this isn't wrong room... btw? Can I put user data for example some options settings instead of con fig or registry? Can I put some user input like user list or use it like small data-base file?
You can do just about anything you want with an XML file, just as you have listed. I personally use them for small databases or settings. For example, I made an XML file containing all the countries in the world. I use this in my applications to populate a Countries ComboBox or DropDownList
Live in fragments no longer. Only connect.
-
TrooperIronMan wrote:
What should I do with XML in my .net C#, program
After supposedly reading online resources such as CP and MSDN as well as books and you still can’t answer this question it's time to chose a new career.
TrooperIronMan wrote:
Almost any XML book I know of is not on specific topic like What should I do with XML in my .net C#,
If you find the book that tell you what to do for your specific project you'd better keep it secret because half the posters on CP will be bombarding your inbox wanting to know where to get a copy. Books, magazines, articles, etc. are not going to tell you what to do for your own little world, you have to do something creative, like actually think for yourself. :wtf::omg:
only two letters away from being an asset
Mark Nischalke wrote:
If you find the book that tell you what to do for your specific project
I though more likely about best practice...
Mark Nischalke wrote:
After supposedly reading online resources such as CP and MSDN
Hard to read much on 56k that brake up line every minute or so that is why I hoped someone do have link for more specific article or sections...
Mark Nischalke wrote:
it's time to chose a new career.
nah... too late for that... now... X| :laugh: :laugh:
-
I wonder what are things I can put in XML in regular C# code, variable names maybe, guess not, but what can we use it for? Files path for resource files, or something like that, what is use of XML in regular Windows program, hope this isn't wrong room... btw? Can I put user data for example some options settings instead of con fig or registry? Can I put some user input like user list or use it like small data-base file?
-
You can do just about anything you want with an XML file, just as you have listed. I personally use them for small databases or settings. For example, I made an XML file containing all the countries in the world. I use this in my applications to populate a Countries ComboBox or DropDownList
Live in fragments no longer. Only connect.
bluewavestrider wrote:
For example, I made an XML file containing all the countries in the world. I use this in my applications to populate a Countries ComboBox or DropDownList
there you go, can you supply some source code, I though about same thing have some drop down lists that I would like to be able to save to XML since user can add some data to them... but it get saved in plain text file... not so cool solution...
-
You can use XML for anything that you want. It's just a flexible data format, it has no specific purpose. XHTML is XML. SOAP uses XML. AJAX uses XML. RSS uses XML. It's everywhere...
--- Year happy = new Year(2007);
I know but I still need some examples of good practice... and how to do it... so... anyone
some code please
-
Mark Nischalke wrote:
If you find the book that tell you what to do for your specific project
I though more likely about best practice...
Mark Nischalke wrote:
After supposedly reading online resources such as CP and MSDN
Hard to read much on 56k that brake up line every minute or so that is why I hoped someone do have link for more specific article or sections...
Mark Nischalke wrote:
it's time to chose a new career.
nah... too late for that... now... X| :laugh: :laugh:
The best advice is, don't use it until you need it.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
I know but I still need some examples of good practice... and how to do it... so... anyone
some code please
Your question can't be answered. What code are you hoping for ? The net abounds with examples of uses of XML, for example, config files, or data files. But, your question is too open ended. The best practice is, if you need to store heirarchical data, or data whose layout may change, XML is worth considering.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
The best advice is, don't use it until you need it.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
I do have one scenario I can think about right now that require something like xml or config file... but would like to try xml on it... For now all I'm doing is learning new tech... so i just explore...
-
Your question can't be answered. What code are you hoping for ? The net abounds with examples of uses of XML, for example, config files, or data files. But, your question is too open ended. The best practice is, if you need to store heirarchical data, or data whose layout may change, XML is worth considering.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
OK, this is one of scenarios I'm currently working on: there is combo box I enabled user to add some data in it, I want to save all that data at program close, and to load same data when program start (it's list of cities btw) I want to save last used file path and load same file at program start up if user confirm it want to continue to work on same data. I want to output some text boxes, datetime pickers, etc at and of work so same data can be loaded at start up if user want so... basicly creating data set in xml... So those are things I'm trying to achieve I can use textual files (and I do use them right now), but I believe with XML it would be easier to manipulate data and more flexible? So any help now?