
# How do I view sample XML when editing a Format?

> Use the Preview Options dropdown when editing a Format to render sample XML from a Block, or a Block plus a context page.

URL: https://www.hannonhill.com/cascadecms/latest/articles/developing-in-cascade/script-formats/view-sample-xml-when-editing-format.html
category: Developing in Cascade
article-type: how-to
content-kind: faq
release-availability: all
tags: interface, velocity
updated: 2026-10-06

When writing or debugging a Format, it helps to see the sample XML being applied to it. For a Velocity Format, you may also need a context page to test the built-in `$currentPage` and `$currentPageSiteName` variables.

1. Edit the Format.
1. Above the code, on the right-hand side, open the **Preview Options** dropdown.
1. Select the **Block**, or the **Block+Page**, that this Format will transform.

The read-only editor to the right of the Format's code is then populated with the rendered XML based on your selections.

![The Preview Options dropdown and rendered XML panel when editing a Format](https://www.hannonhill.com/cascadecms/latest/_files/images/developing-in-cascade/format-preview-screenshot.png)
