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 StringgetAttributeValue(Element elem, String name) static ElementgetChildElement(Element parent, String namespace, String localName) static ElementgetFirstChildElement(Element parent) static StringgetFullXPath(Node endNode) static StringgetFullXPath(Node startNode, Node endNode) static ElementgetNextSiblingElement(Node node) static StringgetNodePathShort(Node node) static DocumentnewDocument(boolean nsAware) static DocumentreadFromFile(String filename) static DocumentreadFromFile(String filename, String encoding) static DocumentreadFromResource(String name, String encoding) static Documentstatic Documentstatic DocumentreadFromStream(InputStream in, String encoding) Deprecated.static byte[]Schreibt das Document UTF-8-Kodiert in ein Bytearray.static voidwriteToFile(Document doc, String filename) static voidwriteToFile(Document doc, String filename, String encoding) static voidwriteToStream(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
-