src/main/java/de/alpharogroup/xml/tag/TagExtensions.java
public static Optional<String> attributesToString(Map<String, String> attributes)
	{
		StringBuilder builder = new StringBuilder();
		if (attributes != null && !attributes.isEmpty())
		{
			builder.append(" ");
			for (final Map.Entry<String, String> entry : attributes.entrySet())
			{
				builder.append(entry.getKey());
				builder.append("=");
				builder.append("\"").append(entry.getValue()).append("\"");
				builder.append(" ");
			}
		}
		else
		{
			return Optional.empty();
		}
		return Optional.of(builder.toString());
	}
public static Optional<String> attributesToString(Map<String, String> attributes)
	{
		StringBuilder builder = new StringBuilder();
		if (attributes != null && !attributes.isEmpty())
		{
			builder.append(" ");
			for (final Map.Entry<String, String> entry : attributes.entrySet())
			{
				builder.append(entry.getKey());
				builder.append("=");
				builder.append("\"").append(entry.getValue()).append("\"");
				builder.append(" ");
			}
		}
		else
		{
			return Optional.empty();
		}
		return Optional.of(builder.toString());
	}
Creates an {@link Optional} of {@link String} from the given attributes map

@param attributes
the attributes map
@return the {@link Optional} of {@link String}