void (@NotNull StringBuilder builder) { builder.append('<').append(myTagName); myAttributes.entrySet().stream().sorted(Map.Entry.comparingByKey()).forEach(entry -> { builder.append(' ').append(entry.getKey()); if (entry.getValue() != null) { builder.append("=\"").append(StringUtil.escapeXmlEntities(entry.getValue())).append('"'); } }); if (myChildren.isEmpty()) { builder.append("/>"); } else { builder.append(">"); for (HtmlChunk child : myChildren) { child.appendTo(builder); } builder.append("</").append(myTagName).append(">"); } }