15,896,153 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by sz3bbylA (Top 3 by date)
sz3bbylA
5-Feb-19 13:18pm
View
so, i don't know to do this , any example, link is helpfull
sz3bbylA
4-Feb-19 18:13pm
View
I already done something like :
xmldoc.xml
Hide Copy Code
<root>
<one>first_one
<two>second_one
<tree>third_one <four>fourth_one
<five>fifth_one
<six>sixth_one
Hide Copy Code
class Use_Xml
{
public static void Save_data(object obj, string filename)
{
XmlSerializer sd = new XmlSerializer(obj.GetType());
TextWriter writer = new StreamWriter(filename);
sd.Serialize(writer, obj);
writer.Close();
}
}
Hide Copy Code
public class Setting
{
private string one_val;
private string two_val;
private string tree_val;
private string four_val;
private string five_val;
private string six_val;
public string One
{
get { return one_val; }
set { one_val = value; }
}
.......................................
public string Six
{
get { return six_val; }
set { six_val = value; }
}
}
I call it with:
Hide Copy Code
Setting set = new Setting
{
One = "one_second",
...................
Six = "six_second"
}
Use_Xml.Save_data(set, location_file);
This One only can update all values
My problem is
1. I want to update one, two or all values
2. I want to read one, two ... or all values
I try to use deserializer but i was stack
i see some solutions but not fit with my situation
i would like to do a setting file to save parameters of program to be loaded on Window_Loaded
the problem i want just to update parameters also to read one, or more parameters
sz3bbylA
4-Feb-19 13:21pm
View
Data at the root level is invalid. Line 1, position 1.
I not expert, srry, i don't know to use it