Class DOMUtilities


  • public class DOMUtilities
    extends Object
    Utilities class that provide various DOM Utilities
    Author:
    KIYUT
    • Method Detail

      • normalizeDocument

        public static void normalizeDocument​(Document doc)
        Normalize the specified Document
        Parameters:
        doc - the Document
      • updateProperty

        public static void updateProperty​(org.w3c.dom.svg.SVGStylable stylable,
                                          String ns,
                                          String name,
                                          String value)
        Update SVG Element property by taking care of the Preferences CSSStyle or Presentation attribute. To remove set value to null. if Preferences stylingCSS == true it will convert any double quote (") with single quote (')
        Parameters:
        stylable - SVGStylable object
        ns - namespace
        name - Property Name
        value - Property Value, if null the property will be removed
      • copyDocument

        @Deprecated
        public static Document copyDocument​(Document srcDoc)
        Deprecated.
        replaced by #deepCloneDocument(Document)
        Return the copy/cloned of srcDoc.
        Parameters:
        srcDoc - the source document
        Returns:
        Return the copy/cloned of srcDoc or null
        See Also:
        deepCloneDocument(Document)
      • deepCloneDocument

        public static Document deepCloneDocument​(Document doc)
        Return a deep cloned Document. It is only a wrapper for Batik DOMUtilities.deepCloneDocument(Document doc, DOMImplementation impl). The impl is using SVGDOMImplementation.getDOMImplementation()
        Parameters:
        doc - the source document
        Returns:
        the copy/clone document