1

Is it possible to format XML code in scintilla in the same way that Visual Studio does when you paste some xml into a xml file.

At the moment, the xml that I retrieve is on one line and therefore hard to work with, it would be great if the xml could be formatted properly on load.

Any suggestions?

Julien Pierre
  • 467
  • 1
  • 6
  • 29

2 Answers2

0

One way to do this is to get .NET to do interpret the XML and export it as a formatted string, using XMLTextWriter - see this question. This assumes you're using Scintilla inside .NET though - you'd have to use the XML features of your platform of choice if not.

Community
  • 1
  • 1
Matt Lyons-Wood
  • 931
  • 11
  • 17
0

You could use NotePad++ or http://xmltoolbox.appspot.com/

j_mcnally
  • 6,928
  • 2
  • 31
  • 46
  • 1
    This is not answering my question, I'm looking for a solution for a Windows Form control called Scintilla, see below the solution – Julien Pierre Feb 19 '12 at 21:47
  • Sorry, I thought you were talking about SciTE, as a one time thing. Let me look around I apologize for the mistake. I didn't understand the context. You want to include this functionality in an application you are making. – j_mcnally Feb 19 '12 at 21:57
  • Could you use something like the answer here? http://stackoverflow.com/questions/1123718/format-xml-string-to-print-friendly-xml-string and then load the result into your Scintilla form control? – j_mcnally Feb 19 '12 at 22:00
  • 1
    Solution http://stackoverflow.com/questions/203528/what-is-the-simplest-way-to-get-indented-xml-with-line-breaks-from-xmldocument/203581#203581 – Julien Pierre Feb 19 '12 at 22:02