public final class DocumentHelper extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addNamespaceDeclaration(Element element,
Namespace namespace)
Adds a namespace declaration attribute to the given element.
|
static void |
addNamespaceDeclaration(Element element,
String namespacePrefix,
String namespaceURI)
Adds a namespace declaration attribute to the given element.
|
static Document |
createDocument()
Creates a new DOM Document
|
static DocumentBuilder |
newDocumentBuilder()
Creates a new document builder, with sensible defaults
|
static Document |
readDocument(InputStream inp)
Parses the given stream via the default (sensible)
DocumentBuilder
|
public static DocumentBuilder newDocumentBuilder()
public static Document readDocument(InputStream inp) throws IOException, SAXException
inp
- Stream to read the XML data fromIOException
SAXException
public static Document createDocument()
public static void addNamespaceDeclaration(Element element, String namespacePrefix, String namespaceURI)
Copyright © 2007-2019. All Rights Reserved.