Class XmlRenderer
- java.lang.Object
-
- com.microstrategy.web.blocks.renderers.AbstractRenderer
-
- com.microstrategy.web.blocks.renderers.XmlRenderer
-
- All Implemented Interfaces:
Renderer
- Direct Known Subclasses:
XmlRendererANF
public class XmlRenderer extends AbstractRenderer
This class is the renderer that converts a Block tree into XML Element Normal Form. It uses theXmlRendererBlockVisitorENFclass to perform the actual traversal of the Block tree.- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
-
Fields inherited from class com.microstrategy.web.blocks.renderers.AbstractRenderer
contentEncoders
-
-
Constructor Summary
Constructors Constructor Description XmlRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarkupOutputgenerateMarkup(BlockContext context, Block block)Generate the markup representation of the specified Block.protected java.util.Comparator<BlockProperty>getBlockPropertyComparator()Returns a comparator used to sort the block properties.protected com.microstrategy.web.blocks.renderers.XmlRendererBlockVisitorgetBlockVisitor(BlockContext context)By default the XMLRenderer will return a block visitor of ENF type.-
Methods inherited from class com.microstrategy.web.blocks.renderers.AbstractRenderer
setEncoderChain
-
-
-
-
Method Detail
-
getBlockVisitor
protected com.microstrategy.web.blocks.renderers.XmlRendererBlockVisitor getBlockVisitor(BlockContext context)
By default the XMLRenderer will return a block visitor of ENF type. The ENF type block visitor will output the XML in Element Normal Form.- Parameters:
context- theBlockContextobject.- Returns:
- the
XmlRendererBlockVisitorENFobject - Since:
- MicroStrategy Web 9.0.1
-
getBlockPropertyComparator
protected java.util.Comparator<BlockProperty> getBlockPropertyComparator()
Returns a comparator used to sort the block properties. Since by default the XMLRenderer outputs the XML in ENF form it doesn't need to sort the block properties therefore it returns null.- Returns:
- null
- Since:
- MicroStrategy Web 9.0.1
-
generateMarkup
public MarkupOutput generateMarkup(BlockContext context, Block block) throws java.lang.Exception
Description copied from interface:RendererGenerate the markup representation of the specified Block.- Parameters:
context- TheBlockContextobject that controls how BlockProperty values are expanded and Blocks are serialized.block- TheBlockto generate markup for.- Returns:
- A new
MarkupOutputobject that contains the generated markup. - Throws:
java.lang.Exception- If an error occurs in the process of generating the markup.
-
-