Kodi Community Forum

Full Version: Insert formatted XML code?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is this possible?

Would be great for all the skin code we post.

Thanks.
Ideally, we don't want long posts of code on the forum at all, just like we don't want logs.

For small snippets the [code] tag should be fine.
if you want syntax highlighting we could think about adding some JS based highlighter
(2014-07-08, 13:06)Kib Wrote: [ -> ]Ideally, we don't want long posts of code on the forum at all, just like we don't want logs.

For small snippets the [code] tag should be fine.

What does XML specific syntax highlighting have to do with the length of the code being posted?

I understand long posts of code are not wanted, but that applies just the same whether you use [code] [php] or [xml] tags. It would simply be a useful feature regardless of length.
Oh well it was unclear to me this was about highlighting
Sorry I should have made my post more clear - syntax highlighting makes it a lot easier to read especially when you're using an editor that does this all the time.

PHP comes close but breaks where URLs are used.

Code:
<content target="video">plugin://service.library.data.provider?type=recentmovies&amp;limit=12</content>
<onload>RunScript(script.skinshortcuts,type=buildxml&amp;mainmenuID=9000&amp;levels=0)</onload>
<visible allowhiddenfocus="false">StringCompare(Window(home).Property(Widget9000),RecentMovies)</visible>
<animation effect="fade" start="100" end="0" time="0">Hidden</animation>
<animation effect="fade" start="0" end="100" time="200">Visible</animation>


PHP Code:
<content target="video">plugin://service.library.data.provider?type=recentmovies&amp;limit=12</content>
<onload>RunScript(script.skinshortcuts,type=buildxml&amp;mainmenuID=9000&amp;levels=0)</onload>
<
visible allowhiddenfocus="false">StringCompare(Window(home).Property(Widget9000),RecentMovies)</visible>
<
animation effect="fade" start="100" end="0" time="0">Hidden</animation>
<
animation effect="fade" start="0" end="100" time="200">Visible</animation