KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > xml > XMLWriter


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  * Free SoftwareFoundation, Inc.
23  * 59 Temple Place, Suite 330
24  * Boston, MA 02111-1307 USA
25  *
26  * @author Scott Ferguson
27  */

28
29 package com.caucho.xml;
30
31 import org.xml.sax.Locator JavaDoc;
32 import org.xml.sax.SAXException JavaDoc;
33
34 import java.io.IOException JavaDoc;
35
36 /**
37  * Interface for printing XML documents.
38  */

39 public interface XMLWriter {
40   public void setDocumentLocator(Locator JavaDoc locator);
41   
42   public void startDocument()
43     throws IOException JavaDoc, SAXException JavaDoc;
44
45   public void endDocument()
46     throws IOException JavaDoc, SAXException JavaDoc;
47
48   public void startPrefixMapping(String JavaDoc prefix, String JavaDoc uri)
49     throws IOException JavaDoc, SAXException JavaDoc;
50
51   public void endPrefixMapping(String JavaDoc prefix)
52     throws IOException JavaDoc, SAXException JavaDoc;
53   
54   public void startElement(String JavaDoc namespaceURI, String JavaDoc localName, String JavaDoc qName)
55     throws IOException JavaDoc, SAXException JavaDoc;
56
57   public void attribute(String JavaDoc namespaceURI, String JavaDoc localName, String JavaDoc qName,
58                         String JavaDoc value)
59     throws IOException JavaDoc, SAXException JavaDoc;
60
61   public void endElement(String JavaDoc namespaceURI, String JavaDoc localName, String JavaDoc qName)
62     throws IOException JavaDoc, SAXException JavaDoc;
63
64   public void text(String JavaDoc text)
65     throws IOException JavaDoc, SAXException JavaDoc;
66   
67   public void text(char []buffer, int offset, int length)
68     throws IOException JavaDoc, SAXException JavaDoc;
69
70   public void cdata(String JavaDoc text)
71     throws IOException JavaDoc, SAXException JavaDoc;
72   
73   public void cdata(char []buffer, int offset, int length)
74     throws IOException JavaDoc, SAXException JavaDoc;
75
76   public boolean getEscapeText();
77   
78   public void setEscapeText(boolean isEscaped);
79   
80   public void processingInstruction(String JavaDoc name, String JavaDoc value)
81     throws IOException JavaDoc, SAXException JavaDoc;
82   
83   public void comment(String JavaDoc value)
84     throws IOException JavaDoc, SAXException JavaDoc;
85 }
86
Popular Tags