"code block" macro works fine for C# and SQL and more.
But when i use it for XML it display me empty content.
I tried with and without the next header:
<?xml version="1.0" encoding="UTF-8"?>
Which version of Confluence are you using (Server/Cloud, if Server, which version number)?
In general, the Code Block macro works for XML, but it might have something to do with your particular version of Confluence and/or what kind of XML you are trying to display.
Cloud.
i tried many simple XML.
Please try it to verify it is works now in the Cloud version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you switched to the new interface?
I tested it in the old interface, and it worked fine.
I tested it in the new interface, and it didn't work to paste the XML code (the tags got stripped out), but typing the XML code directly worked ok.
Another option might be to install the Better Code Macro (free from Atlassian Labs), and that might work better for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How can i know if i used the old or new interface?
I am new user 2 weeks ago.
(my tags also got stripped out).
I will use the Better Code Macro.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are a new user, then you're probably on the new interface. It's the one with bright blue instead of dark blue, and with the main menu on the left side instead of the top.
I figured out a workaround to get past the XML pasting issue:
Put the cursor where you want the code macro to go, then click "➕ ▾", and "Markup".
In the box that pops up, make sure Confluence Wiki is selected, then type {code}, paste your XML, and then type {code} again.
Click the "Insert" button, and then you should have the code macro with the code inserted properly, and you can edit the options to choose "HTML and XML" to highlight the content properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Yes. i with the new interfcae.
Great workaround. Works fine.
Thanks.
If you will fix the problem it will be excellent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.