#例如XML节点为这样的,如何通过XStream来映射JavaBean呢?
<node att="value">text</node>
#在Stack Overflow上找到了解答,you can use a predefined Converter.
@XStreamAlias("node")@XStreamConverter(value=ToAttributedValueConverter.class,strings={"text"})
public class Node {
private String att;
private String text;
}
原文链接:https://www.f2er.com/xml/297070.html