me.chanjar.weixin.mp.util.xml

## 类 XStreamTransformer

- java.lang.Object
- - me.chanjar.weixin.mp.util.xml.XStreamTransformer

    public class XStreamTransformer
    extends Object

### 构造器概要

构造器
构造器和说明
`XStreamTransformer()`

### 方法概要

方法
`static <T> T` `fromXml(Class<T> clazz, InputStream is)`
`static <T> T` `fromXml(Class<T> clazz, String xml)` xml -> pojo
`static void` `register(Class<?> clz, com.thoughtworks.xstream.XStream xStream)` 注册扩展消息的解析器
`static void` `registerClass(Class<?> clz)` 会自动注册该类及其子类
`static <T> String` `toXml(Class<T> clazz, T object)` pojo -> xml

### 从类继承的方法 java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 构造器详细资料

#### XStreamTransformer

    public XStreamTransformer()

### 方法详细资料

#### fromXml

    public static <T> T fromXml(Class<T> clazz,
                String xml)

xml -> pojo

#### fromXml

    public static <T> T fromXml(Class<T> clazz,
                InputStream is)

#### toXml

    public static <T> String toXml(Class<T> clazz,
                   T object)

pojo -> xml

#### register

    public static void register(Class<?> clz,
                com.thoughtworks.xstream.XStream xStream)

注册扩展消息的解析器

参数:
  `clz` - 类型
  `xStream` - xml解析器

#### registerClass

    public static void registerClass(Class<?> clz)

会自动注册该类及其子类

参数:
  `clz` - 要注册的类