code: public static void writeNode(Node node, List<BelTerm> supportingTerms,
              PrintWriter writer) {
          int x = new Random().nextInt(200);
          int y = new Random().nextInt(200);
  
          StringBuilder sb = new StringBuilder();
          sb.append("  <node label='");
          sb.append(node.label);
          sb.append("' id='");
          sb.append(node.id.toString());
          sb.append("'>\n");
          sb.append("    <att name='function type'");
          sb.append(" value='");
          sb.append(node.function.getDisplayValue());
          sb.append("' />\n");
          sb.append("    <att name='parameters'");
          sb.append(" value='");
  
          String params = "";
          for (BelTerm t : supportingTerms) {
              if (hasLength(params)) {
                  params = params.concat("&#10;");
              }
              String label = t.getLabel();
              label = label.replaceAll("&", "&amp;");
              label = label.replaceAll("'", "&quot;");
              params = params.concat(label);
          }
          sb.append(params);
          sb.append("' />\n");
  
          // Graphics type and fill color
          String graphics = format(NODE_GRAPHICS, type(node.function),
                  color(node.function), x, y, params);
          sb.append(graphics);
  
          sb.append("  </node>\n");
          writer.write(sb.toString());
      }
docs: Write an XGMML {@code <node>} from {@code node} properties.
  
  @param node {@link Node}, the node to write
  @param writer {@link PrintWriter}, the writer