/** * Creates and adds an {@link EndElement} event. * * @param localName The unqualified element name. * @throws XMLStreamException If an error occurs adding the event. */ public void addEndElement(String localName) throws XMLStreamException { addEndElement(localName, (Iterator) null); }
/** * Creates and adds an {@link EndElement} event. * * @param ns The element namespace. * @param localName The element name. * @throws XMLStreamException If an error occurs adding the event. */ public void addEndElement(String ns, String localName) throws XMLStreamException { addEndElement(ns, localName, (Iterator) null); }
/** * Creates and adds an {@link EndElement} event. * * @param name The element name. * @see XMLEventFactory#createEndElement(QName, Iterator) * @throws XMLStreamException If an error occurs adding the event. */ public void addEndElement(QName name) throws XMLStreamException { addEndElement(name, (Iterator) null); }
/** * Adds a simple text element with no attributes or namespace declarations. * * @param name The unqualified element name. * @param text The text content, which may be <code>null</code> * @param context The element's {@link NamespaceContext}, or <code>null</code>. * @throws XMLStreamException If an error occurs adding an event. */ public void addTextElement(String name, String text, NamespaceContext context) throws XMLStreamException { addStartElement(name, context); if (text != null) { addText(text); } addEndElement(name); }
/** * Adds a simple text element with no attributes or namespace declarations. * * @param name The element name. * @param text The text content, which may be <code>null</code> * @param context The element's {@link NamespaceContext}, or <code>null</code>. * @throws XMLStreamException If an error occurs adding an event. */ public void addTextElement(QName name, String text, NamespaceContext context) throws XMLStreamException { addStartElement(name, context); if (text != null) { addText(text); } addEndElement(name); }