I am trying to ask a question which contains sample XML code but I can't paste sample XML code in the question. How it can be done?
3 Answers 3
Note that if your XML doesn't get recognized despite the code block, you can add
<!-- language: lang-xml -->
before the code block. This has been elaborated in this page and further in here.
Feature was added in 2011 so I realize it was not available at the time the question and the other answers were placed.
-
In the interest of someone stumbling into this problem in the future, here's an example how to use it (revision 4).mikołak– mikołak07/27/2013 09:44:37Commented Jul 27, 2013 at 9:44
-
1It worked using a shorter version:
<!-- language: xml -->
.ROMANIA_engineer– ROMANIA_engineer01/24/2015 16:21:08Commented Jan 24, 2015 at 16:21
You need to paste your XML, and then highlight the lines in question, and press on the "code" button ({ }
on the editor toolbar).
The code button
This will nicely format and syntax highlight your code and/or XML.
-
You can't even imagine but this doesn't work for my XML :)it3xl– it3xl12/29/2020 21:30:07Commented Dec 29, 2020 at 21:30
XML is still a language so use the regular code button (its the icon with binary on it) otherwise use http://pastebin.com to post the code and then past the link here.
Not that hard
-
5Please post sample XML in the question; not on a separate site.ben is uǝq backwards– ben is uǝq backwards04/17/2013 10:05:20Commented Apr 17, 2013 at 10:05