Class DOMBuilder


  • @ThreadSafe
    public final class DOMBuilder
    extends java.lang.Object
    Builds a MathML tree from a given DOM tree.
    Version:
    $Revision: 5a7becda9147 $
    • Constructor Detail

      • DOMBuilder

        protected DOMBuilder()
        Default constructor.
    • Method Detail

      • getInstance

        public static DOMBuilder getInstance()
        Returns:
        the singleton instance of the DOMBuilder
      • createJeuclidDom

        public DocumentElement createJeuclidDom​(org.w3c.dom.Node node)
        Constructs a builder with content math support.
        Parameters:
        node - The MathML document. Can be an instance of Document, Element or DocumentFragment with Element child
        Returns:
        the parsed Document
        See Also:
        createJeuclidDom(Node, boolean)
      • createJeuclidDom

        public DocumentElement createJeuclidDom​(org.w3c.dom.Node node,
                                                boolean supportContent)
        Constructs a builder.

        This constructor needs a valid DOM Tree. To obtain a DOM tree, you may use MathMLParserSupport.

        Parameters:
        node - The MathML document. Can be an instance of Document, Element or DocumentFragment with Element child
        supportContent - if set to true, content Math will be supported. This impacts performance.
        Returns:
        the parsed Document
        See Also:
        MathMLParserSupport
      • createJeuclidDom

        public DocumentElement createJeuclidDom​(org.w3c.dom.Node node,
                                                boolean supportContent,
                                                boolean addNamespace)
        Constructs a builder.

        This constructor needs a valid DOM Tree. To obtain a DOM tree, you may use MathMLParserSupport.

        Parameters:
        node - The MathML document. Can be an instance of Document, Element or DocumentFragment with Element child
        supportContent - if set to true, content Math will be supported. This impacts performance.
        addNamespace - if set to true, the MathML namespace will be added to all elements.
        Returns:
        the parsed Document
        See Also:
        MathMLParserSupport