티스토리 뷰

공부/Java, JSP

Xstream :: List in Object

doublemetal 2015. 6. 4. 18:27

http://stackoverflow.com/questions/4077071/how-to-convert-list-of-object-to-xml-doc-using-xstream


class Article {

private int id;


...


private List<Journalist> jounalists;


...

}



xstream.alias("article", Article.class);

xstream.addImplicitCollection(Article.class, "journalists", Journalist.class);

'공부 > Java, JSP' 카테고리의 다른 글

[Thymeleaf] Url with pathvariable  (0) 2015.08.11
client IP 가져오기  (0) 2015.07.27
Xstream :: List in Object  (0) 2015.06.04
xml parsing - Document, XPath  (0) 2015.05.20
[정규식] HTML 태그 제거  (0) 2015.05.19
JAXB XML 변환 객체없이 wrapper  (0) 2015.02.24
댓글
댓글쓰기 폼