Print the xml element. In the form {@code <name att1="value1" att2="value2"/>}.

@param name the xml element to print
@param attributes the xml attributes of the element to print
497959
public void printXMLElement(String name, Map<String, String> attributes)
    {
        Element element = new DefaultElement(name);

        if (attributes != null && !attributes.isEmpty()) {
            for (Map.Entry<String, String> entry : attributes.entrySet()) {
                element.addAttribute(entry.getKey(), entry.getValue());
            }
        }

        try {
            this.xmlWriter.write(element);
        } catch (IOException e) {
            // TODO: add error log here
        }
    }
667723
public void attribute(final String attrName, final String attrVal) throws IOException {
    out(" ");
    out(attrName);
    out("=");
    quote(attrVal);
  }
234680
@Override
    public boolean containsAttribute(final String name) {
        CommonHelper.assertNotNull("name", name);
        return this.attributes.containsKey(name);
    }
325265
public void addAttribute(final String _name, final String _value) {
        this.attributes.put(_name, new XmlNode() {
            {
                this.name = _name;
                this.value = _value;
                this.valid = true;
                this.type = XmlNode.ATTRIBUTE_NODE;
            }
        });
    }
151273
def xml_starttag (self, name, attrs=None):
        
        self.write(self.indent*self.level)
        self.write(u"<%s" % xmlquote(name))
        if attrs:
            for name, value in attrs.items():
                args = (xmlquote(name), xmlquoteattr(value))
                self.write(u' %s="%s"' % args)
        self.writeln(u">")
        self.level += 1
1224451
public void xml(String xml) {
    if (LogLevel.DEBUG < logConfiguration.logLevel) {
      return;
    }
    printlnInternal(LogLevel.DEBUG, logConfiguration.xmlFormatter.format(xml));
  }
61568
protected void writeAttribute(OutputStream outputStream, String name, String value) {
        if (value != null) {
            write(outputStream, " " + name + "=\"" + value + "\"");
        }
    }
890076
public Attribute getAttribute(String name)
  {
    for (int i = _attributes.size() - 1; i >= 0; i--) {
      Attribute attr = _attributes.get(i);

      if (attr.getName().equals(name))
        return attr;
    }

    return null;
  }
444798
public Object getAttribute(String name)
    {
        if (_attributes==null)
            return null;
        return _attributes.get(name);
    }
1100768
public void writeAttribute(String name, Object value)
  {
    if (!_isElementOpen)
      throw new IllegalStateException("no open element");

    if (value == null)
      return;

    _isElementOpen = false;
    try {
      _strategy.writeAttribute(this, name, value);
    }
    finally {
      _isElementOpen = true;
    }

  }
817250
@Override
    public void writeAttribute(String localName, String value)
        throws XMLStreamException
    {
        // No need to set mAnyOutput, nor close the element
        if (!mStartElementOpen && mCheckStructure) {
            reportNwfStructure(ErrorConsts.WERR_ATTR_NO_ELEM);
        }
        doWriteAttr(localName, null, null, value);
    }
247562
protected static String getAttribute(Node node, String name, boolean required) {
        NamedNodeMap attributes = node.getAttributes();
        Node idNode = attributes.getNamedItem(name);
        if (idNode == null) {
            if (required) {
                throw new IllegalArgumentException(toPath(node) + " has no " + name + " attribute");
            }
            else {
                return "";
            }
        }
        else {
            String value = idNode.getNodeValue();
            if (value == null) {
                return "";
            }
            return value;
        }
    }
7626
public T attr(String name, String value) throws IOException {
		if (value != null) {
			writer.write(' ');
			writer.write(name);
			writer.write("=\"");
			writer.write(value);
			writer.write('\"');
		}
		return (T) this;
	}
599339
public XmlStringBuilder attribute(String name, String value) {
        assert value != null;
        sb.append(' ').append(name).append("='");
        escapeAttributeValue(value);
        sb.append('\'');
        return this;
    }
840809
public void delete(String name) throws IOException {
        if (name.equalsIgnoreCase(PERMITTED_SUBTREES)) {
            permitted = null;
        } else if (name.equalsIgnoreCase(EXCLUDED_SUBTREES)) {
            excluded = null;
        } else {
          throw new IOException("Attribute name not recognized by " +
                        "CertAttrSet:NameConstraintsExtension.");
        }
        encodeThis();
    }
588304
public B attr(String name, String value) {
        get().setAttribute(name, value);
        return that();
    }
750055
public void removeAttribute(String name) {
		if(logger.isDebugEnabled()) {
        	logger.debug("removeAttribute - name=" + name);
        }
		if(attributes  != null) {
			this.attributes.remove(name);
		}
	}