FileDocCategorySizeDatePackage
SAXOutputter.javaAPI DocApache Axis 1.45108Sat Apr 22 18:57:28 BST 2006org.apache.axis.message

SAXOutputter

public class SAXOutputter extends DefaultHandler implements LexicalHandler

Fields Summary
protected static Log
log
org.apache.axis.encoding.SerializationContext
context
boolean
isCDATA
Constructors Summary
public SAXOutputter(org.apache.axis.encoding.SerializationContext context)

    
      
    
        this.context = context;
    
Methods Summary
public voidcharacters(char[] p1, int p2, int p3)

        if (log.isDebugEnabled()) {
            log.debug("SAXOutputter.characters ['" + new String(p1, p2, p3) + "']");
        }
        try {
            if(!isCDATA) {
                context.writeChars(p1, p2, p3);
            } else { 
                context.writeString(new String(p1, p2, p3));
            }
        } catch (IOException e) {
            throw new SAXException(e);
        }
    
public voidcomment(char[] ch, int start, int length)

        if (log.isDebugEnabled()) {
            log.debug("SAXOutputter.comment ['" + new String(ch, start, length) + "']");
        }
        try {
            context.writeString("<!--");
            context.writeChars(ch, start, length);
            context.writeString("-->");
        } catch (IOException e) {
            throw new SAXException(e);
        }
    
public voidendCDATA()

        try {
            isCDATA = false;
            context.writeString("]]>");
        } catch (IOException e) {
            throw new SAXException(e);
        }
    
public voidendDTD()

    
public voidendDocument()

        if (log.isDebugEnabled()) {
            log.debug("SAXOutputter.endDocument");
        }
    
public voidendElement(java.lang.String namespace, java.lang.String localName, java.lang.String qName)

        if (log.isDebugEnabled()) {
            log.debug("SAXOutputter.endElement ['" + namespace + "' " +
                           localName + "]");
        }
        
        try {
            context.endElement();
        } catch (IOException e) {
            throw new SAXException(e);
        }
    
public voidendEntity(java.lang.String name)

    
public voidendPrefixMapping(java.lang.String p1)

        // !!!
    
public voidignorableWhitespace(char[] p1, int p2, int p3)

        try {
            context.writeChars(p1, p2, p3);
        } catch (IOException e) {
            throw new SAXException(e);
        }
    
public voidskippedEntity(java.lang.String p1)

    
public voidstartCDATA()

        try {
            isCDATA = true;
            context.writeString("<![CDATA[");
        } catch (IOException e) {
            throw new SAXException(e);
        }
    
public voidstartDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)

    
public voidstartDocument()

        context.setSendDecl(true);
    
public voidstartElement(java.lang.String namespace, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)

        if (log.isDebugEnabled()) {
            log.debug("SAXOutputter.startElement ['" + namespace + "' " +
                           localName + "]");
        }

        try {
            context.startElement(new QName(namespace,localName), attributes);
        } catch (IOException e) {
            throw new SAXException(e);
        }
    
public voidstartEntity(java.lang.String name)

    
public voidstartPrefixMapping(java.lang.String p1, java.lang.String p2)

        context.registerPrefixForURI(p1,p2);