I've written articles with a one-line code snippet, but is it acceptable to put a large code snippet? I think a code snippet would enhance the article, but I'm not sure if it's allowed.
For example, I'm writing about an XML file format, and I wanted to give an example. So, I wanted to do something like:
An example of a sitemap file format is below:
<urlset>
<url>
<loc>url</loc>
<lastmod>2009-12-20</lastmod>
<changefreq>monthly</changefreq>
</url>
</urlset>
Is this ok? Also, in the programming world, tabs are a standard to format the code. So, basically the above should read:
<urlset>
<url>
<loc>url</loc>
<lastmod>2009-12-20</lastmod>
<changefreq>monthly</changefreq>
</url>
</urlset>
If a code snippet is allowed, is the above allowed?
**Edit...bah, the forum software is trimming my spaces!
What are the rules for code snippets?
Moderators: Celeste Stewart, Ed, Constant
Re: What are the rules for code snippets?
Sweet!
And that was quick!
And that was quick!