<comment> directives in the XML file format

Posted by Nick Gammon on Thu 16 May 2002 09:13 AM — 1 posts, 5,716 views.

Australia Forum Administrator #0
For those of you who have downloaded the new version of MUSHclient that supports XML (3.21) you might want to try this new, and (as yet) undocumented feature. Try selecting the text below the line here, copy it to the clipboard, and then go to an open MUSHclient world, and select:

File -> Import -> Clipboard




<muclient>
<comment>
<![CDATA[
The <comment> tag allows you to imbed comments into your snippets, 
that will be read by the person installing (importing) the snippet.

This is intended to be used by people distributing snippets, to be used for:

* What the snippet does (eg. a wilderness walker)
* Installation instructions
* How to use it
* Code to be pasted into the script file

By using the optional "<![CDATA[" sequence (which is standard XML), you can imbed the
normally forbidden characters "<", "&", ">" and others without worrying about having to
"escape" them.

Because of this, you should be able to simply copy and paste your VBscript (or JScript etc.) 
code into the <comment>, unless it has the (rather unlikely) CDATA termination sequence, 
in which case you would simply reformat the code slightly to avoid that happening.

You can have multiple <comment> directives in your XML documents, they will be concatenated
and presented in the order in which they occur.

]]>

</comment>
</muclient>