@@ -98,12 +98,10 @@ private void process(final Element parent, final StreamReceiver receiver) {
9898 addedValueAsSubfield = handleAttributeValuesAsSubfields (receiver , element , attributes , attribute );
9999 receiver .literal (attribute .getKey (), attribute .getValue ());
100100 }
101- if (element .children ().isEmpty ()) {
102- final String text = element .text ().trim ();
103- final String value = text .isEmpty () ? element .data () : text ;
104- if (!value .isEmpty () && !addedValueAsSubfield ) {
105- receiver .literal ("value" , value );
106- }
101+ final String text = element .text ().trim ();
102+ final String value = text .isEmpty () ? element .data () : text ;
103+ if (!value .isEmpty () && !addedValueAsSubfield ) {
104+ receiver .literal ("value" , value );
107105 }
108106 process (element , receiver );
109107 receiver .endEntity ();
@@ -133,7 +131,7 @@ private boolean handleAttributeValuesAsSubfields(final StreamReceiver receiver,
133131 * @param mapString the attributes to be added as subfields
134132 */
135133 public void setAttrValsAsSubfields (final String mapString ) {
136- this .attrValsAsSubfields = new HashMap <String , String >();
134+ this .attrValsAsSubfields = new HashMap <>();
137135 final String input = mapString .startsWith ("&" ) ? DEFAULT_ATTR_VALS_AS_SUBFIELDS + mapString : mapString ;
138136 for (final String nameValuePair : input .split ("&" )) {
139137 final String [] nameValue = nameValuePair .split ("=" );
0 commit comments