What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 150 Stack Exchange communities.

This question already has an answer here:

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?

share|improve this question

migrated from stackoverflow.com Jun 24 '10 at 10:42

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Time Traveling Bobby, psubsee2003, Shadow Wizard, Bart, hims056 Apr 17 '13 at 14:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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.

share|improve this answer
In the interest of someone stumbling into this problem in the future, here's an example how to use it (revision 4). – mikołak Jul 27 '13 at 9:44
It worked using a shorter version: <!-- language: xml -->. – mathematician Jan 24 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.

share|improve this answer

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

share|improve this answer
Please post sample XML in the question; not on a separate site. – ben is uǝq backwards Apr 17 '13 at 10:05
This is a test comment – Brian Webster Apr 17 '13 at 17:09