code: @Override
  	public void paint(final RenderContext renderContext) {
  		// Check interceptor is enabled
  		if (!DebugValidateXML.isEnabled()) {
  			super.paint(renderContext);
  			return;
  		}
  
  		if (!(renderContext instanceof WebXmlRenderContext)) {
  			LOG.warn("Unable to validate against a " + renderContext);
  			super.paint(renderContext);
  			return;
  		}
  
  		LOG.debug("Validate XML Interceptor: Start");
  
  		WebXmlRenderContext webRenderContext = (WebXmlRenderContext) renderContext;
  		PrintWriter writer = webRenderContext.getWriter();
  
  		// Generate XML
  		StringWriter tempBuffer = new StringWriter();
  		PrintWriter tempWriter = new PrintWriter(tempBuffer);
  		WebXmlRenderContext tempContext = new WebXmlRenderContext(tempWriter, UIContextHolder.
  				getCurrent().getLocale());
  
  		super.paint(tempContext);
  		String xml = tempBuffer.toString();
  
  		// If no errors, check against the schema
  		String error = DebugValidateXML.validateXMLAgainstSchema(xml);
  
  		if (error != null) {
  			// XML is NOT valid, so Report Errors and Wrap the original XML
  			LOG.debug("Validate XML Interceptor: XML Has Errors");
  			writer.println("<div>");
  
  			writer.println("<div>");
  			writer.println("Invalid XML");
  			writer.println("<ul><li>" + WebUtilities.encode(error) + "</li></ul>");
  			writer.println("<br/>");
  			writer.println("</div>");
  
  			// If a schema error detected, Wrap XML so line numbers reported in validation message are correct
  			String testXML = DebugValidateXML.wrapXMLInRootElement(xml);
  			paintOriginalXML(testXML, writer);
  
  			writer.println("</div>");
  		} else {
  			// XML is valid
  			writer.write(xml);
  		}
  
  		LOG.debug("Validate XML Interceptor: Finished");
  	}
docs: Override paint to include XML Validation.
  
  @param renderContext the renderContext to send the output to.