Package de.consist.bmu.rule.util
Class XmlUtils
java.lang.Object
de.consist.bmu.rule.util.XmlUtils
Hilfsroutinen für XML-Dokumente.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAttributeValue
(Element elem, String name) static Element
getChildElement
(Element parent, String namespace, String localName) static Element
getFirstChildElement
(Element parent) static String
getFullXPath
(Node endNode) static String
getFullXPath
(Node startNode, Node endNode) static Element
getNextSiblingElement
(Node node) static String
getNodePathShort
(Node node) static Document
newDocument
(boolean nsAware) static Document
readFromFile
(String filename) static Document
readFromFile
(String filename, String encoding) static Document
readFromResource
(String name, String encoding) static Document
static Document
static Document
readFromStream
(InputStream in, String encoding) Deprecated.static byte[]
Schreibt das Document UTF-8-Kodiert in ein Bytearray.static void
writeToFile
(Document doc, String filename) static void
writeToFile
(Document doc, String filename, String encoding) static void
writeToStream
(Document doc, OutputStream outStream, String encoding)
-
Method Details
-
writeToFile
- Parameters:
doc
- Documentfilename
- String- Throws:
BMUException
- BMUException
-
writeToFile
- Parameters:
doc
- Documentfilename
- Stringencoding
- String- Throws:
BMUException
- BMUException
-
writeToStream
public static void writeToStream(Document doc, OutputStream outStream, String encoding) throws BMUException - Parameters:
doc
- DocumentoutStream
- OutputStreamencoding
- String- Throws:
BMUException
- BMUException
-
serialize
Schreibt das Document UTF-8-Kodiert in ein Bytearray.- Parameters:
doc
- Document- Returns:
- byte[]
- Throws:
BMUException
- BMUException
-
readFromFile
- Parameters:
filename
- String- Returns:
- Document
- Throws:
BMUException
- BMUException
-
readFromResource
- Parameters:
name
- Stringencoding
- String- Returns:
- Document
- Throws:
BMUException
- BMUException
-
readFromFile
- Parameters:
filename
- Stringencoding
- String- Returns:
- Document
- Throws:
BMUException
- BMUException
-
readFromStream
@Deprecated public static Document readFromStream(InputStream in, String encoding) throws BMUException Deprecated.- Parameters:
in
- InputStreamencoding
- String- Returns:
- Document
- Throws:
BMUException
- BMUException
-
readFromStream
- Parameters:
in
- InputStream- Returns:
- Document
- Throws:
BMUException
- BMUException
-
readFromSource
- Parameters:
in
- InputSource- Returns:
- Document
- Throws:
BMUException
- BMUException
-
newDocument
- Parameters:
nsAware
- boolean- Returns:
- Document
- Throws:
BMUException
- BMUException
-
getNodePathShort
- Throws:
BMUException
-
getFirstChildElement
-
getChildElement
-
getAttributeValue
-
getNextSiblingElement
-
getFullXPath
-
getFullXPath
-