A Markdown-like syntax for writing XML

[ via del.icio.us ] Scott Sweeney’s SLiP has been around since 2002, but I didn’t hear of it until recently.

element(attribute=value):

    #comment

    subelement:"text node"

    anothersub:"""

                Python-style 'here' doc.

    """

generates:

<element attribute=value>

<!--comment-->

	<subelement>

		text node

	</subelement>

	<anothersub>

		Python-style 'here' doc.

	</anothersub>

</element>

Like Markdown, you can use it as a BBEdit filter.

  • Download and expand the archive file.
  • Copy sliplib.py and sliptokenizer.py into /Library/Python/2.3.
  • Copy slip2xml.py into ~/Library/Application Support/BBEdit/Unix Support/Unix Filters.

Possibly Related posts (machine generated):

  1. XPath Class for PHP
  2. On that usage question…
  3. RTF to XML: a couple of products
  4. Overenthusiastic Hyperlinking
  5. Using Elements and Attributes

More like this: , .

blog comments powered by Disqus