XmlUtils
class XmlUtils
Description: Xml data conversion class
method XmlUtils construction method
public XmlUtils(String packageName)
Description: Construction method
Input parameters: package name。
Output parameter: None。
Related parameters: None。
method xmlToObject
public T xmlToObject(String xmlString, Class<T> clazz)
Description: Convert xml string to Java object
Input parameters: xmlString: xml string clazz : The Java object class of the root node.
Output parameter: Returns an object of the generic type T that represents the deserialized XML data。
Related parameters: None。
method objectToXml
public String objectToXml(Object model)
Description: Convert java object to xml string
Input parameters: model Object object.
Output parameter: Returns a String representation of the resulting XML document。
Related parameters: None。