public class DomHelper extends Object
| Constructor and Description |
|---|
DomHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
detach(Node node)
If the node is attached to a parent then detach it
|
static Transformer |
getTransformer() |
static TransformerFactory |
getTransformerFactory() |
static void |
removeNextSiblingText(Element element)
Removes any next siblings text nodes
|
static void |
removePreviousSiblingText(Element element)
Removes any previous siblings text nodes
|
static void |
replaceWith(Node oldNode,
Node newNode)
Replaces the old node with the new node
|
static void |
save(Document document,
File file) |
static void |
setTransformer(Transformer transformer) |
static void |
setTransformerFactory(TransformerFactory transformerFactory) |
public static void save(Document document, File file) throws FileNotFoundException, TransformerException
public static Transformer getTransformer() throws TransformerConfigurationException
public static void setTransformer(Transformer transformer)
public static TransformerFactory getTransformerFactory()
public static void setTransformerFactory(TransformerFactory transformerFactory)
public static void detach(Node node)
public static void replaceWith(Node oldNode, Node newNode)
public static void removePreviousSiblingText(Element element)
public static void removeNextSiblingText(Element element)
Copyright © 2011–2014 Red Hat. All rights reserved.