Paste XML as formatted string in IntelliJ
Answered
Hi ,
I have a large XML. I want to paste it into IntelliJ in this format. How should i do it ?
Example XML
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
When Pasted in IntelliJ
"<note> " +
" <to>Tove</to>" +
" <from>Jani</from> " +
" <heading>Reminder</heading>"+
" <body>Don't forget me this weekend!</body>"+
"</note>"
Is there any shortcut way of doing it rather than manually doing it ?
Basically i need it as string but also, not in one line . I need it with those XML indentations .
Please sign in to leave a comment.
Hi. Using Edit | Paste simple will paste the line as it is.
yes , it pastes but please notice I want them all in a string . Please look at the example above.
Just paste inside the quotes: