Package kiyut.sketsa.util
Class DOMUtilities
- java.lang.Object
-
- kiyut.sketsa.util.DOMUtilities
-
public class DOMUtilities extends Object
Utilities class that provide various DOM Utilities- Author:
- KIYUT
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DocumentcopyDocument(Document srcDoc)Deprecated.replaced by #deepCloneDocument(Document)static DocumentdeepCloneDocument(Document doc)Return a deep cloned Document.static voidnormalizeDocument(Document doc)Normalize the specified Documentstatic voidupdateProperty(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.
-
-
-
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 objectns- namespacename- Property Namevalue- 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
-
-