The following steps will enable users to see the XML output for a Page:
- Create a new Template with only the following content:
- Click Manage Site
- In the Configurations area, click Go to Configurations
- Select your existing Configuration and edit it
- Click Add new Output
- For the Name field, enter 'XML'
- For the Template field, browse to the Template that was created in the first step here
- For the File Extension field, enter '.xml'
- For the Type of Data field, select XML
- Leave the Publishable field unchecked
- Click Submit
Now, navigate to a Page asset which is using the Configuration that was just modified. While viewing the Page, click the Output drop down menu and select 'XML'. Clicking on this output will display the system generated XML for that Page.
NOTE: In some cases, viewing the XML content of a page will result in the following error message:
Could not convert JDOM document into string: Exception outputting Document: Root element not set
To resolve this, try changing the Template content from:
<xml> <system-region name="DEFAULT"/> </xml>
This will ensure that the content within the DEFAULT region always has a root element.
TIP: It is often helpful to use the 'XML' configuration's DEFAULT region for plugging in context-sensitive Index Blocks. For example, any Index Block with Rendering Behavior set to Start at the current page... will mean that the Block must be plugged into a Page region before it will generate any XML. To see the XML output for a given page that uses a context-sensitive Index Block:
- Click Edit on the Page
- Click the Configure pane
- Click the 'XML' Configuration
- In the DEFAULT region, click the Block chooser and select the Index Block
- Click Submit
Now, return to the Page view and select the 'XML' output. It will display the XML generated by the Index Block as it pertains to the Page.