I need to open and edit XML file using notepad++, I know how to open text file using savefileDilog but i need to get the Color coding which has in Notepad++ for XML coding, Please help me to do this, if i can get the colors for tags attributes in another way also OK.
Asked
Active
Viewed 1,065 times
2 Answers
0
Process.Start( fullPathToNotePadPlusPlus, filename )
But you need full path to Notepad++, I'm not sure on the best way to get it.
The easiest for you might be to associate .xml files with notepad++.
Right click on an xml file, and do "Open With" --> "Choose default program"
Then set Notepad++ (you may need to browse for it )
Check "Always use the selected program to open this kind of file"
Then you could just do:
Process.Start( filename )

Derek
- 7,615
- 5
- 33
- 58
0
Notepad++ has the command line parameter -l for language, so you can run it with the syntax highlighting you want.
Process.Start(pathToNotepadExe, "-lxml [filename]");
see http://npp-community.tuxfamily.org/documentation/notepad-user-manual/command-line

FallenSquirrel
- 197
- 7