public class XmlUtils extends Converter
限定符和类型 | 方法和说明 |
---|---|
static String |
getNodeValue(Node node,
String nodeName) |
static <T> List<T> |
parserToList(Class<T> c,
InputStream inputSteam,
boolean useAnnotation)
解析xml流串到c的实例list
|
static <T> List<T> |
parserToList(Class<T> c,
String str,
boolean useAnnotation)
解析xml流串到c的实例list
|
static <T> T |
parserToObject(Class<T> c,
InputStream inputSteam,
boolean useAnnotation)
解析xml流串到c的实例
|
static <T> T |
parserToObject(Class<T> c,
String str,
boolean useAnnotation)
解析xml流串到c的实例
|
static String |
toXml(Object obj,
boolean useAnnotation)
转换Object到xml
|
getFieldName, isBaseClass, isTransient, isWrapClass, parseBoolean, parseDouble, parseFloat, parseInt, parseLong, parserJson, parserJsonList, parserXml, parserXmlList
public static String toXml(Object obj, boolean useAnnotation)
obj
- useAnnotation
- public static <T> T parserToObject(Class<T> c, String str, boolean useAnnotation) throws XMLParserException
T
- c
- 解析目标类str
- 解析字符串useAnnotation
- 是否使用注解XMLParserException
public static <T> T parserToObject(Class<T> c, InputStream inputSteam, boolean useAnnotation) throws XMLParserException
T
- c
- 解析目标类inputSteam
- 输入流useAnnotation
- 是否使用注解XMLParserException
public static <T> List<T> parserToList(Class<T> c, String str, boolean useAnnotation) throws XMLParserException
T
- c
- 解析目标类str
- 解析字符串useAnnotation
- 是否使用注解XMLParserException
public static <T> List<T> parserToList(Class<T> c, InputStream inputSteam, boolean useAnnotation) throws XMLParserException
T
- c
- 解析目标类inputSteam
- 输入流useAnnotation
- 是否使用注解XMLParserException