Package zombie.util
Class PZXmlUtil
java.lang.Object
zombie.util.PZXmlUtil
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
PZXmlUtil
public PZXmlUtil()
-
-
Method Details
-
parseXml
Parses the XML data from the specified Source. The Source can be either a file path, or a file GUID.- Parameters:
source
- The data source. Can be a file path, or a file GUID.- Returns:
- The root XML Element
- Throws:
PZXmlParserException
-
createNewDocument
-
forEachElement
-
parse
Deserialize function. Parses the supplied XML source, and creates a new instance of the supplied type. The Source can be either a file path, or a file GUID.- Parameters:
type
- The type of the loaded class. A new instance is created.source
- The data source. Can be a file name or a file GUID.- Returns:
- A new instance of the supplied type, loaded with the supplied data source.
- Throws:
PZXmlParserException
-
write
public static <T> void write(T data, File outFile) throws TransformerException, IOException, javax.xml.bind.JAXBException - Throws:
TransformerException
IOException
javax.xml.bind.JAXBException
-
write
- Throws:
TransformerException
IOException
-
tryWrite
-
tryWrite
-