XStream处理既有属性又有值的xml节点


XML: html

<node a="1">bcvvvvvv</node> java


Bean: node

@XStreamAlias("node")

@XStreamConverter(value=ToAtrributedValueConverter.class,strings={"content"})

public static class node{
@XStreamAsAttribtue

private String a;

private String content;

public node(String a,

                String content){

    this.a=a;

this.content=content
}

}



http://xstream.codehaus.org/annotations-tutorial.html#FieldAsText this

相关文章
相关标签/搜索