private void appendMetadataElement(StringBuffer buf, String name, String value, String line_ending) {
		if (name == null || name.length() == 0) {
			return;
		}
		buf.append("\t");
		buf.append("<").append(ELEMENT_METADATA).append(" ").append(ATTRIBUTE_NAME).append("=\"").append(escapeXMLAttribute(name)).append("\">");
		XMLTools.writeCDATA(buf, value);
		buf.append("</").append(ELEMENT_METADATA).append(">").append(line_ending);
	}