001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: *
023: * Free Software Foundation, Inc.
024: * 59 Temple Place, Suite 330
025: * Boston, MA 02111-1307 USA
026: *
027: * @author Scott Ferguson
028: */
029:
030: package javax.xml.stream;
031:
032: import javax.xml.namespace.NamespaceContext;
033:
034: public interface XMLStreamWriter {
035:
036: public void close() throws XMLStreamException;
037:
038: public void flush() throws XMLStreamException;
039:
040: public NamespaceContext getNamespaceContext();
041:
042: public String getPrefix(String uri) throws XMLStreamException;
043:
044: public Object getProperty(String name)
045: throws IllegalArgumentException;
046:
047: public void setDefaultNamespace(String uri)
048: throws XMLStreamException;
049:
050: public void setNamespaceContext(NamespaceContext context)
051: throws XMLStreamException;
052:
053: public void setPrefix(String prefix, String uri)
054: throws XMLStreamException;
055:
056: public void writeAttribute(String localName, String value)
057: throws XMLStreamException;
058:
059: public void writeAttribute(String namespaceURI, String localName,
060: String value) throws XMLStreamException;
061:
062: public void writeAttribute(String prefix, String namespaceURI,
063: String localName, String value) throws XMLStreamException;
064:
065: public void writeCData(String data) throws XMLStreamException;
066:
067: public void writeCharacters(char[] text, int start, int len)
068: throws XMLStreamException;
069:
070: public void writeCharacters(String text) throws XMLStreamException;
071:
072: public void writeComment(String data) throws XMLStreamException;
073:
074: public void writeDefaultNamespace(String namespaceURI)
075: throws XMLStreamException;
076:
077: public void writeDTD(String dtd) throws XMLStreamException;
078:
079: public void writeEmptyElement(String localName)
080: throws XMLStreamException;
081:
082: public void writeEmptyElement(String namespaceURI, String localName)
083: throws XMLStreamException;
084:
085: public void writeEmptyElement(String prefix, String localName,
086: String namespaceURI) throws XMLStreamException;
087:
088: public void writeEndDocument() throws XMLStreamException;
089:
090: public void writeEndElement() throws XMLStreamException;
091:
092: public void writeEntityRef(String name) throws XMLStreamException;
093:
094: public void writeNamespace(String prefix, String namespaceURI)
095: throws XMLStreamException;
096:
097: public void writeProcessingInstruction(String target)
098: throws XMLStreamException;
099:
100: public void writeProcessingInstruction(String target, String data)
101: throws XMLStreamException;
102:
103: public void writeStartDocument() throws XMLStreamException;
104:
105: public void writeStartDocument(String version)
106: throws XMLStreamException;
107:
108: public void writeStartDocument(String encoding, String version)
109: throws XMLStreamException;
110:
111: public void writeStartElement(String localName)
112: throws XMLStreamException;
113:
114: public void writeStartElement(String namespaceURI, String localName)
115: throws XMLStreamException;
116:
117: public void writeStartElement(String prefix, String localName,
118: String namespaceURI) throws XMLStreamException;
119: }
|