/** * Write the attribute to the stream. * @param out The output stream. * @param attributeName The attribute name. * @param attributeValue The attribute value. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttribute(final XMLStreamWriter out, final QName attributeName, final Object attributeValue) throws XMLStreamException { if (attributeValue instanceof QName) { writeAttribute(out, attributeName, (QName)attributeValue) ; } else { writeAttribute(out, attributeName, attributeValue.toString()) ; } }
/** * Write the attribute to the stream. * @param out The output stream. * @param attributeName The attribute name. * @param attributeValue The attribute value. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttribute(final XMLStreamWriter out, final QName attributeName, final Object attributeValue) throws XMLStreamException { if (attributeValue instanceof QName) { writeAttribute(out, attributeName, (QName)attributeValue) ; } else { writeAttribute(out, attributeName, attributeValue.toString()) ; } }
/** * Write the attribute to the stream. * @param out The output stream. * @param attributeName The attribute name. * @param attributeValue The attribute value. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttribute(final XMLStreamWriter out, final QName attributeName, final Object attributeValue) throws XMLStreamException { if (attributeValue instanceof QName) { writeAttribute(out, attributeName, (QName)attributeValue) ; } else { writeAttribute(out, attributeName, attributeValue.toString()) ; } }
/** * Write the attribute to the stream. * @param out The output stream. * @param attributeName The attribute name. * @param attributeValue The attribute value. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttribute(final XMLStreamWriter out, final QName attributeName, final Object attributeValue) throws XMLStreamException { if (attributeValue instanceof QName) { writeAttribute(out, attributeName, (QName)attributeValue) ; } else { writeAttribute(out, attributeName, attributeValue.toString()) ; } }
/** * Write the attributes to the stream. * @param out The output stream. * @param attributes The attributes. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttributes(final XMLStreamWriter out, final Map attributes) throws XMLStreamException { final Set entrySet = attributes.entrySet() ; final Iterator entryIter = entrySet.iterator() ; while(entryIter.hasNext()) { final Map.Entry entry = (Map.Entry)entryIter.next() ; final QName name = (QName)entry.getKey() ; final Object value = entry.getValue() ; writeAttribute(out, name, value) ; } }
/** * Write the attributes to the stream. * @param out The output stream. * @param attributes The attributes. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttributes(final XMLStreamWriter out, final Map attributes) throws XMLStreamException { final Set entrySet = attributes.entrySet() ; final Iterator entryIter = entrySet.iterator() ; while(entryIter.hasNext()) { final Map.Entry entry = (Map.Entry)entryIter.next() ; final QName name = (QName)entry.getKey() ; final Object value = entry.getValue() ; writeAttribute(out, name, value) ; } }
/** * Write the attributes to the stream. * @param out The output stream. * @param attributes The attributes. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttributes(final XMLStreamWriter out, final Map attributes) throws XMLStreamException { final Set entrySet = attributes.entrySet() ; final Iterator entryIter = entrySet.iterator() ; while(entryIter.hasNext()) { final Map.Entry entry = (Map.Entry)entryIter.next() ; final QName name = (QName)entry.getKey() ; final Object value = entry.getValue() ; writeAttribute(out, name, value) ; } }
/** * Write the attributes to the stream. * @param out The output stream. * @param attributes The attributes. * @throws XMLStreamException Thrown for errors during writing. */ public static void writeAttributes(final XMLStreamWriter out, final Map attributes) throws XMLStreamException { final Set entrySet = attributes.entrySet() ; final Iterator entryIter = entrySet.iterator() ; while(entryIter.hasNext()) { final Map.Entry entry = (Map.Entry)entryIter.next() ; final QName name = (QName)entry.getKey() ; final Object value = entry.getValue() ; writeAttribute(out, name, value) ; } }
if (namespaceURI.length() == 0) writeAttribute(out, attributeName, attributeValue.getLocalPart()) ; writeAttribute(out, attributeName, QNameHelper.toQualifiedName(attributeValue)) ; writeAttribute(out, attributeName, QNameHelper.toQualifiedName(origPrefix, attributeValue.getLocalPart())) ;
if (namespaceURI.length() == 0) writeAttribute(out, attributeName, attributeValue.getLocalPart()) ; writeAttribute(out, attributeName, QNameHelper.toQualifiedName(attributeValue)) ; writeAttribute(out, attributeName, QNameHelper.toQualifiedName(origPrefix, attributeValue.getLocalPart())) ;
if (namespaceURI.length() == 0) writeAttribute(out, attributeName, attributeValue.getLocalPart()) ; writeAttribute(out, attributeName, QNameHelper.toQualifiedName(attributeValue)) ; writeAttribute(out, attributeName, QNameHelper.toQualifiedName(origPrefix, attributeValue.getLocalPart())) ;
if (namespaceURI.length() == 0) writeAttribute(out, attributeName, attributeValue.getLocalPart()) ; writeAttribute(out, attributeName, QNameHelper.toQualifiedName(attributeValue)) ; writeAttribute(out, attributeName, QNameHelper.toQualifiedName(origPrefix, attributeValue.getLocalPart())) ;