Package elki.utilities.xml
Class DOMCloner
- java.lang.Object
-
- elki.utilities.xml.DOMCloner
-
- Direct Known Subclasses:
SVGCloneVisible
public class DOMCloner extends java.lang.Object
Class for cloning XML document, with filter capabilites- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description DOMCloner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.Document
cloneDocument(org.w3c.dom.DOMImplementation domImpl, org.w3c.dom.Document document)
Deep-clone a document.org.w3c.dom.Node
cloneNode(org.w3c.dom.Document doc, org.w3c.dom.Node eold)
Clone an existing node.void
copyAttributes(org.w3c.dom.Document doc, org.w3c.dom.Element eold, org.w3c.dom.Element enew)
Copy the attributes from an existing node to a new node.
-
-
-
Method Detail
-
cloneDocument
public org.w3c.dom.Document cloneDocument(org.w3c.dom.DOMImplementation domImpl, org.w3c.dom.Document document)
Deep-clone a document.- Parameters:
domImpl
- DOM implementation to usedocument
- Original document- Returns:
- Cloned document
-
cloneNode
public org.w3c.dom.Node cloneNode(org.w3c.dom.Document doc, org.w3c.dom.Node eold)
Clone an existing node.- Parameters:
doc
- Documenteold
- Existing node- Returns:
- Cloned node
-
copyAttributes
public void copyAttributes(org.w3c.dom.Document doc, org.w3c.dom.Element eold, org.w3c.dom.Element enew)
Copy the attributes from an existing node to a new node.- Parameters:
doc
- Target documenteold
- Existing nodeenew
- Target node
-
-