code: private static StringBuffer doAppendOpeningTag(StringBuffer buffer, String tag, Map<String, String> attributes)
  	{
  		buffer.append(SEQUENCE__TAG__BEGIN_OPENING_TAG).append(tag);
  		for (String _attributeName : attributes.keySet())
  		{
  			String _attributeValue = attributes.get(_attributeName);
  			_attributeValue = encodeAttributeValue(_attributeValue);
  			buffer.append(SEQUENCE__ATTRIBUTE__BEGIN).append(_attributeName).append(SEQUENCE__ATTRIBUTE__EQUALS)
  					.append(_attributeValue).append(SEQUENCE__ATTRIBUTE__END);
  		}
  		buffer.append(SEQUENCE__TAG__END_OF_TAG);
  		return buffer;
  	}
docs: Add an opening tag with attributes to a StringBuffer.
  
  @param buffer
  StringBuffer to fill
  @param tag
  the tag to open
  @param attributes
  the attribute map
  @return the buffer