@@ -98,12 +98,10 @@ private void process(final Element parent, final StreamReceiver receiver) {
98
98
addedValueAsSubfield = handleAttributeValuesAsSubfields (receiver , element , attributes , attribute );
99
99
receiver .literal (attribute .getKey (), attribute .getValue ());
100
100
}
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 );
107
105
}
108
106
process (element , receiver );
109
107
receiver .endEntity ();
@@ -133,7 +131,7 @@ private boolean handleAttributeValuesAsSubfields(final StreamReceiver receiver,
133
131
* @param mapString the attributes to be added as subfields
134
132
*/
135
133
public void setAttrValsAsSubfields (final String mapString ) {
136
- this .attrValsAsSubfields = new HashMap <String , String >();
134
+ this .attrValsAsSubfields = new HashMap <>();
137
135
final String input = mapString .startsWith ("&" ) ? DEFAULT_ATTR_VALS_AS_SUBFIELDS + mapString : mapString ;
138
136
for (final String nameValuePair : input .split ("&" )) {
139
137
final String [] nameValue = nameValuePair .split ("=" );
0 commit comments