Skip to content
| Marketplace
Sign in
Visual Studio>Templates>RuReadWriteXML v2.1
RuReadWriteXML v2.1

RuReadWriteXML v2.1

Klaus Ruttkowski

|
8,447 installs
| (0) | Free
Writing and reading an XML object, with or without a file dialog
Download

Writing and reading an XML object, with or without a file dialog

The ItemTemplate is for Windows Forms and WPF

Here is an example with a phonebook

using RuFramework

// Default file name           
string filename = "PhoneBook.xml";

// Create phonebook           
PhoneBook phoneBook = new PhoneBook();

// Create phonenumber           
Number numberRemove = new Number();

// Add number to phonebook           
Number number = new Number();           
number.Type = "mobil";           
number.Value = "01781111111111";            
phoneBook.Add(number);

// Write to XML file with SaveFileDialog          
RuXML.Write_XML<PhoneBook>(phoneBook, filename, true);  // true  = With Filedialog
 // false = Without Filedialog

// Read from XML file with OpenFileDialog           
phoneBook = RuXML.Read_XML<PhoneBook>(filename, true);

 

A sample file is installed when you insert the template.
This shows an example of a Form object with a button.
The example can, of course, be deleted again.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft