I don't think the proposed solution is correct. Instead of working around the incorrect decision, we should modify the code to make the right decision in the first place. Basically if the number of children is >= 1 and all the children are text nodes, then we should process it as an attribute. In the attribute processing we should then use concatChildValues() rather than getChildValue() to get the full text of the attribute. Please rework.