How to make XStream skip unmapped tags when parsing XML?

XStream xstream = new XStream() {     @Override     protected MapperWrapper wrapMapper(MapperWrapper next) {         return new MapperWrapper(next) {             @Override             public boolean shouldSerializeMember(Class definedIn, String fieldName) {                 if (definedIn == Object.class) {                     return false;                 }                 return super.shouldSerializeMember(definedIn, fieldName);             }         };     } };
转载自:http://stackoverflow.com/questions/5377380/how-to-make-xstream-skip-unmapped-tags-when-parsing-xml

你可能感兴趣的:(String,Class,tags,Parsing)