Chantal Decraie

Chantal Decraie

  • NA
  • 20
  • 1.6k

How to open an XML file in a richtextbox and.....++

Feb 17 2017 9:04 AM
Hi,
 
could someone explain to me how I could open an XML file in a richtextbox without using the openFileDialog please?
It's as this:
I first tried to use the openFileDialog to open my file and give it back in a richtextbox. So far, no problem. I could see the Xml file as is. But when I wanted to change some fields in it using XmlReader, XmlDocument, etc.. the file is read with backwards slashes and spaces in it. where of course the readers gives error message about strange characters that they can't read.
 

 

"\n\n \n 45071dc8-558d-439a-8f0a-88ae73a74910\n 386\n 2016-06-14T12:31:58.0+01:00\n \n 5414488009809\n \n \n 0000000000000 \n \n \n 5414488009809\n  

 

 
 
So I'm guessing I need to leave the openFileDialog and try to load the xml file.... or maybe the whole folder with xml files to show up in a tree or something like that . Because the purpose is to change some nodes in the files hardcoded afterwards.
 
I have added the code that I already have in a notepad.
 
Thanks in advance. 

Attachment: XML_testversion.rar

Answers (3)