- All Implemented Interfaces:
Provider
XML 序列化提供者,实现对象到 XML 字符串的转换
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
XmlProvider
public XmlProvider()
-
Method Details
-
serialize
将对象序列化为 XML 字符串
- Specified by:
serialize in interface Provider
- Parameters:
object - 要序列化的对象
- Returns:
- 序列化后的 XML 字符串,若序列化失败返回空字符串