/** * Creates and adds a CDATA {@link Characters} event. * * @param content The CDATA content, as per * {@link XMLEventFactory#createCData(String)}. * @throws XMLStreamException If an error occurs adding the event. */ public void addCData(String content) throws XMLStreamException { add(factory.createCData(content)); }
/** * Creates and adds a {@link StartDocument} event. * * @param encoding The encoding to include in the xml declaration. * @param version The XML version to include in the xml declaration. * @see XMLEventFactory#createStartDocument(String, String) * @throws XMLStreamException If an error occurs adding the event. */ public void addStartDocument(String encoding, String version) throws XMLStreamException { add(factory.createStartDocument(encoding, version)); }
/** * Creates and adds an {@link EndDocument} event. * * @see XMLEventFactory#createEndDocument() * @throws XMLStreamException If an error occurs adding the event. */ public void addEndDocument() throws XMLStreamException { add(factory.createEndDocument()); }
/** * Creates and adds a {@link DTD} event. * * @param dtd The DTD content, as per * {@link XMLEventFactory#createDTD(String)}. * @throws XMLStreamException If an error occurs adding the event. */ public void addDTD(String dtd) throws XMLStreamException { add(factory.createDTD(dtd)); }
/** * Creates and adds a {@link Comment} event. * * @param comment The comment text, as per * {@link XMLEventFactory#createComment(String)}. * @throws XMLStreamException If an error occurs adding the event. */ public void addComment(String comment) throws XMLStreamException { add(factory.createComment(comment)); }
/** * Creates and adds an {@link EndElement} event. * * @param ns The element namespace. * @param localName The element name. * @param namespaces An {@link Iterator} over the element's namespaces that * are going out of scope. * @throws XMLStreamException If an error occurs adding the event. */ public void addEndElement(String ns, String localName, Iterator namespaces) throws XMLStreamException { add(factory.createEndElement(null, ns, localName, namespaces)); }
/** * Creates and adds a {@link Characters} event. * * @param content The text content, as per * {@link XMLEventFactory#createCharacters(String)}. * @throws XMLStreamException If an error occurs adding the event. */ public void addText(String content) throws XMLStreamException { add(factory.createCharacters(content)); }
/** * Creates and adds a whitespace {@link Characters} event. * * @param content The whitespace, as per * {@link XMLEventFactory#createIgnorableSpace(String)}. * @throws XMLStreamException If an error occurs adding the event. */ public void addSpace(String content) throws XMLStreamException { add(factory.createSpace(content)); }
/** * Creates and adds a {@link StartDocument} event. * * @see XMLEventFactory#createStartDocument() * @throws XMLStreamException If an error occurs adding the event. */ public void addStartDocument() throws XMLStreamException { add(factory.createStartDocument()); }
/** * Creates and adds a {@link StartDocument} event. * * @param encoding The encoding to specify in the xml declaration. * @see XMLEventFactory#createStartDocument(String) * @throws XMLStreamException If an error occurs adding the event. */ public void addStartDocument(String encoding) throws XMLStreamException { add(factory.createStartDocument(encoding)); }
/** * Creates and adds an {@link EndElement} event. * * @param localName The unqualified element name. * @param namespaces An {@link Iterator} over the element's namespaces that * are going out of scope. * @throws XMLStreamException If an error occurs adding the event. */ public void addEndElement(String localName, Iterator namespaces) throws XMLStreamException { add(factory.createEndElement(null, null, localName, namespaces)); }
/** * Creates and adds an ignorable space {@link Characters} event. * * @param content The ignorable whitespace, as per * {@link XMLEventFactory#createIgnorableSpace(String)}. * @throws XMLStreamException If an error occurs adding the event. */ public void addIgnorableSpace(String content) throws XMLStreamException { add(factory.createIgnorableSpace(content)); }
/** * Creates and adds a {@link StartDocument} event. * * @param encoding The encoding to include in the xml declaration. * @param version The XML version to include in the xml declaration. * @param standalone The standalone value to include in the xml declaration. * @see XMLEventFactory#createStartDocument(String, String, boolean) * @throws XMLStreamException If an error occurs adding the event. */ public void addStartDocument(String encoding, String version, boolean standalone) throws XMLStreamException { add(factory.createStartDocument(encoding, version, standalone)); }
/** * Creates and adds an {@link EndElement} event. * * @param name The element name. * @param namespaces An {@link Iterator} over the element's namespaces that * are going out of scope. * @see XMLEventFactory#createEndElement(QName, Iterator) * @throws XMLStreamException If an error occurs adding the event. */ public void addEndElement(QName name, Iterator namespaces) throws XMLStreamException { add(factory.createEndElement(name, namespaces)); }
/** * Creates and adds a {@link StartElement} event. * * @param localName The local name of the element. * @param attributes An {@link Iterator} over the element's attributes. * @param namespaces An {@link Iterator} over the element's namespaces. * @param context The element's {@link NamespaceContext}, or <code>null</code>. * @throws XMLStreamException If an error occurs adding the event. */ public void addStartElement(String localName, Iterator attributes, Iterator namespaces, NamespaceContext context) throws XMLStreamException { add(factory.createStartElement("", "", localName, attributes, namespaces, context)); }
/** * Creates and adds a {@link StartElement} event. * * @param ns The element's namespace URI. * @param localName The local name of the element. * @param attributes An {@link Iterator} over the element's attributes. * @param namespaces An {@link Iterator} over the element's namespaces. * @param context The element's {@link NamespaceContext}, or <code>null</code>. * @throws XMLStreamException If an error occurs adding the event. */ public void addStartElement(String ns, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context) throws XMLStreamException { add(factory.createStartElement("", ns, localName, attributes, namespaces, context)); }
/** * Creates and adds a {@link StartElement} event. * * @param name The qualified element name. * @param attributes An {@link Iterator} over the element's attributes. * @param namespaces An {@link Iterator} over the element's namespaces. * @param context The element's {@link NamespaceContext}, or <code>null</code>. * @throws XMLStreamException If an error occurs adding the event. */ public void addStartElement(QName name, Iterator attributes, Iterator namespaces, NamespaceContext context) throws XMLStreamException { add(factory.createStartElement(name.getPrefix(), name.getNamespaceURI(), name.getLocalPart(), attributes, namespaces, context)); }