Class CmsXmlContentTree

  • public class CmsXmlContentTree
    extends java.lang.Object
    Tree representation of CmsXmlContent which is suitable for XML-to-JSON transformations.
    • Constructor Detail

      • CmsXmlContentTree

        public CmsXmlContentTree​(CmsXmlContent content,
                                 java.util.Locale locale)
        Creates a new instance and initializes the full tree for the given locale.
        content - the content from which the tree should be generated
        locale - the locale for which the tree should be generated
    • Method Detail

      • visitNodes

        public static void visitNodes​(CmsXmlContentTree.Node node,
                                      java.util.function.Consumer<CmsXmlContentTree.Node> handler)
        Visits all Node instances that are descendants of a given node (including that node itself).
        node - the root node
        handler - the handler to be invoked for all descendant nodes
      • createNode

        public CmsXmlContentTree.Node createNode​(org.dom4j.Element elem,
                                                 CmsXmlContentDefinition contentDef)
        Creates a node for the given content definition and DOM element.
        elem - the XML DOM element
        contentDef - the content definition (null for non-nested values)
        the created node
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
        See Also: