All Implemented Interfaces:
IElementRenderer, IXmlElementRenderer

public class XmlContentItem extends XmlDocumentRendererBase

This class converts an IContentItem implementation to an XML node for document xml generation.

Since IContentItem is a composite element all its children will be renderer to xml as well.

For example rendering a content item with a content style "header", description "header_form" and presentation style "form_with_color" will result in:

 <HEADER userfriendlyname="header_form" style="form_with_color"/>
 

For example rendering a content item without a content style and an image as child will result in:

 <IMAGE name="image"/>
 
Since:
7.0
Author:
Jon van Leuven
  • Constructor Details

    • XmlContentItem

      protected XmlContentItem(boolean tagsToUpperCase)
  • Method Details

    • toXml

      public IXmlElement toXml(IXmlRendererContext ctx, IElement element)
      Description copied from interface: IXmlElementRenderer
      This function allows one to convert an IElement instance to an XML element. The implementor of this function should only convert the element itself and not it's children as the caller will process these. (Unless ctx.setContinueChildProcessing( false ) has been called)
      Parameters:
      ctx - The context which contains some information and control options.
      element - The element which should be converted.
      Returns:
      an XMLElement class or null indicating this element should not be included in the resulting xml.