@Test public void writeDefaultNamespace() { writer.writeStartDocument(); writer.writeStartElement("uri:urn:a", "test"); writer.writeDefaultNamespace("uri:urn:a"); writer.writeCharacters("test it"); writer.writeEndElement(); writer.writeEndDocument(); writer.close(); assertXml("<?xml version='1.0' ?><test xmlns=\"uri:urn:a\">test it</test>"); }
@Override public void writeDefaultNamespace(String namespaceURI) { writeAttribute("xmlns", namespaceURI); }
DefaultXmlStreamWriter extends XmlStreamWriter { @Override public void writeDefaultNamespace(String namespaceURI) { writeAttribute("xmlns", namespaceURI); } }
DefaultXmlStreamWriter extends XmlStreamWriter { @Override public void writeDefaultNamespace(String namespaceURI) { writeAttribute("xmlns", namespaceURI); } DefaultXmlStreamWriter(OutputStream out);  DefaultXmlStreamWriter(Writer out);  DefaultXmlStreamWriter(Writer out, char xmlHeaderQuoteChar); }
DefaultXmlStreamWriter extends XmlStreamWriter { @Override public void writeDefaultNamespace(String namespaceURI) { writeAttribute("xmlns", namespaceURI); } DefaultXmlStreamWriter(OutputStream out);  DefaultXmlStreamWriter(Writer out);  DefaultXmlStreamWriter(Writer out, char xmlHeaderQuoteChar); @Override void close(); @Override void flush(); @Override String getPrefix(String uri); @Override String getNamespaceURI(String prefix); Object getProperty(String name); @Override void setDefaultNamespace(String uri); @Override void setPrefix(String prefix, String uri); @Override void writeAttribute(String localName, String value); @Override void writeAttribute(String namespaceURI, String localName, String value); @Override void writeAttribute(String prefix, String namespaceURI, String localName, String value); @Override void writeCData(String data); @Override void writeCharacters(String text); void writeCharactersUnescaped(String text); @Override void writeLiteral(String literal); @Override void writeCharacters(char[] text, int start, int len); @Override void writeComment(String data); @Override void writeDTD(String dtd); @Override void writeDefaultNamespace(String namespaceURI); @Override void writeEmptyElement(String localName); @Override void writeEmptyElement(String namespaceURI, String localName); @Override void writeEmptyElement(String prefix, String localName, String namespaceURI); @Override void writeEndDocument(); @Override void writeEndElement(); @Override void writeEntityRef(String name); @Override void writeNamespace(String prefix, String namespaceURI); @Override void writeProcessingInstruction(String target); @Override void writeProcessingInstruction(String target, String data); @Override void writeStartDocument(); @Override void writeStartDocument(String version); @Override void writeStartDocument(String encoding, String version); @Override void writeStartElement(String localName); @Override void writeStartElement(String namespaceURI, String localName); @Override void writeStartElement(String prefix, String localName, String namespaceURI); char getXmlHeaderQuoteChar(); void setXmlHeaderQuoteChar(char xmlHederQuoteChar); @Deprecated char getXmlHederQuoteChar(); @Deprecated void setXmlHederQuoteChar(char xmlHederQuoteChar); }
DefaultXmlStreamWriter extends XmlStreamWriter { @Override public void writeDefaultNamespace(String namespaceURI) { writeAttribute("xmlns", namespaceURI); } DefaultXmlStreamWriter(OutputStream out);  DefaultXmlStreamWriter(Writer out);  DefaultXmlStreamWriter(Writer out, char xmlHeaderQuoteChar); @Override void close(); @Override void flush(); @Override String getPrefix(String uri); @Override String getNamespaceURI(String prefix); Object getProperty(String name); @Override void setDefaultNamespace(String uri); @Override void setPrefix(String prefix, String uri); @Override void writeAttribute(String localName, String value); @Override void writeAttribute(String namespaceURI, String localName, String value); @Override void writeAttribute(String prefix, String namespaceURI, String localName, String value); @Override void writeCData(String data); @Override void writeCharacters(String text); void writeCharactersUnescaped(String text); @Override void writeLiteral(String literal); @Override void writeCharacters(char[] text, int start, int len); @Override void writeComment(String data); @Override void writeDTD(String dtd); @Override void writeDefaultNamespace(String namespaceURI); @Override void writeEmptyElement(String localName); @Override void writeEmptyElement(String namespaceURI, String localName); @Override void writeEmptyElement(String prefix, String localName, String namespaceURI); @Override void writeEndDocument(); @Override void writeEndElement(); @Override void writeEntityRef(String name); @Override void writeNamespace(String prefix, String namespaceURI); @Override void writeProcessingInstruction(String target); @Override void writeProcessingInstruction(String target, String data); @Override void writeStartDocument(); @Override void writeStartDocument(String version); @Override void writeStartDocument(String encoding, String version); @Override void writeStartElement(String localName); @Override void writeStartElement(String namespaceURI, String localName); @Override void writeStartElement(String prefix, String localName, String namespaceURI); char getXmlHeaderQuoteChar(); void setXmlHeaderQuoteChar(char xmlHederQuoteChar); @Deprecated char getXmlHederQuoteChar(); @Deprecated void setXmlHederQuoteChar(char xmlHederQuoteChar);  }