Package zombie.util
Class PZXmlUtil
java.lang.Object
zombie.util.PZXmlUtil
public final class PZXmlUtil
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description PZXmlUtil() -
Method Summary
Modifier and Type Method Description static org.w3c.dom.DocumentcreateNewDocument()static voidforEachElement(org.w3c.dom.Element element, java.util.function.Consumer consumer)static java.lang.Objectparse(java.lang.Class javaClass, java.lang.String string)static org.w3c.dom.ElementparseXml(java.lang.String string)static booleantryWrite(java.lang.Object object, java.io.File file)static booleantryWrite(org.w3c.dom.Document document, java.io.File file)static voidwrite(java.lang.Object object, java.io.File file)static voidwrite(org.w3c.dom.Document document, java.io.File file)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PZXmlUtil
public PZXmlUtil()
-
-
Method Details
-
parseXml
- Throws:
PZXmlParserException
-
createNewDocument
public static org.w3c.dom.Document createNewDocument() -
forEachElement
public static void forEachElement(org.w3c.dom.Element element, java.util.function.Consumer consumer) -
parse
public static java.lang.Object parse(java.lang.Class javaClass, java.lang.String string) throws PZXmlParserException- Throws:
PZXmlParserException
-
write
public static void write(java.lang.Object object, java.io.File file) throws javax.xml.transform.TransformerException, java.io.IOException, javax.xml.bind.JAXBException- Throws:
javax.xml.transform.TransformerExceptionjava.io.IOExceptionjavax.xml.bind.JAXBException
-
write
public static void write(org.w3c.dom.Document document, java.io.File file) throws javax.xml.transform.TransformerException, java.io.IOException- Throws:
javax.xml.transform.TransformerExceptionjava.io.IOException
-
tryWrite
public static boolean tryWrite(java.lang.Object object, java.io.File file) -
tryWrite
public static boolean tryWrite(org.w3c.dom.Document document, java.io.File file)
-