Вопрос

How to color XML block and copy it into clipboard with colored formatting? I need to color XML in my Google Document..

example

Это было полезно?

Решение

The shareware text editor UltraEdit supports syntax highlighting for XML files and all other types of text files. For XML a syntax highlighting language definition is already ready to use after installation of UltraEdit.

In the dialog opened via View - Themes - Manage Themes there is on tab Syntax the language XML with the colors and font style settings for this syntax highlighting language which can be changed by the user. If an XML file is currently opened, the changes made on the color and font style settings can be immediately viewed on syntax highlighted XML file without closing the themes customization dialog.

It is even possible to create a syntax highlighting language wordfile specific to a set of tags, attributes and values which I have done already for myself for 3 types of XML files and some other users of UltraEdit as well, see for example Wordfile for KML.

Another feature of UltraEdit is to copy the entire file contents or just a selected block with current syntax highlighting formatting to clipboard in RTF or HTML format using the commands in Edit - Copy Special.

The combination of a fully customizable syntax highlighting for any type of text file and the feature to copy the file or just a block with syntax highlighting formatting in RTF or HTML format to clipboard to paste in other applications like email or word processing applications makes UltraEdit an ideal solution for tasks like this one. It is even possible to paste the RTF or HTML formatted text in clipboard into a new text file and save the file with extension RTF or HTML to get directly a RTF or HTML file from the other text file with formatting attributes/tags.

Другие советы

The feature is also in Notepad++ ,

  • open XML file,
  • right click on selected text to open menu,
  • choose 'Plugin commands' -> 'Copy text with Syntax Highlighting'
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top