2019.6.28
private static StringBuilder attributeObject(NamedNodeMap attrs){
var result = new StringBuilder("{");
for(int i=0;i<attrs.getLength();i++){
if(i>0){
result.append(", ");
}
result.append(jsonEscape(attrs.item(i).getNodeName()));
result.append(": ");
result.append(jsonEscape(attrs.item(i).getNodeValue()));
}
result.append("}");
return result;
}