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.Document createNewDocument()  
    static void forEachElement​(org.w3c.dom.Element element, java.util.function.Consumer consumer)  
    static java.lang.Object parse​(java.lang.Class javaClass, java.lang.String string)  
    static org.w3c.dom.Element parseXml​(java.lang.String string)  
    static boolean tryWrite​(java.lang.Object object, java.io.File file)  
    static boolean tryWrite​(org.w3c.dom.Document document, java.io.File file)  
    static void write​(java.lang.Object object, java.io.File file)  
    static void write​(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

      public static org.w3c.dom.Element parseXml​(java.lang.String string) throws PZXmlParserException
      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.TransformerException
      java.io.IOException
      javax.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.TransformerException
      java.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)