Convert XMl code to java code with expression
<date-time>2008-07-13T18:00:00</date-time>
开发者_JS百科
Perhaps you're looking for something like this:
String pattern = "'<date-time>'yyyy-MM-dd'T'HH:mm:ss'</date-time>'";
SimpleDateFormat format = new SimpleDateFormat(pattern);
Date date = format.parse("<date-time>2008-07-13T18:00:00</date-time>");
精彩评论