티스토리 뷰

공부/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  (1) 2015.08.11
client IP 가져오기  (0) 2015.07.27
xml parsing - Document, XPath  (0) 2015.05.20
[정규식] HTML 태그 제거  (0) 2015.05.19
JAXB XML 변환 객체없이 wrapper  (0) 2015.02.24
댓글
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함