Added basic snippet functionality

The goal is to support custom (in-memory XML snippets) via an API.