Class XMLWriterContext
- java.lang.Object
-
- org.apache.manifoldcf.agents.common.XMLContext
-
- org.apache.manifoldcf.agents.common.XMLWriterContext
-
- Direct Known Subclasses:
XMLOutputStreamContext
public class XMLWriterContext extends XMLContext
An instance of this class represents a parsing context within a node. Data is written to the supplied writer.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.WritertheWriterThe writer-
Fields inherited from class org.apache.manifoldcf.agents.common.XMLContext
localname, namespaceURI, previousContext, qname, theseAttributes, theStream
-
-
Constructor Summary
Constructors Constructor Description XMLWriterContext(XMLStream theStream, java.lang.String namespaceURI, java.lang.String localname, java.lang.String qname, org.xml.sax.Attributes theseAttributes, java.io.Writer writer)Full constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected XMLContextbeginTag(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)Start a child tag.protected voidendTag()End a child tag.protected static java.lang.StringescapeAttribute(java.lang.String value)Convert a string to a value that's safe to include inside an attribute valueprotected static voidescapeCharData(char[] chars, int start, int length, java.io.Writer out)Escapes sequence of characters to output writervoidflush()Flush the data to the underlying output streamprotected voidtagContents(char[] ch, int start, int length)This method is meant to be extended by classes that extend this class-
Methods inherited from class org.apache.manifoldcf.agents.common.XMLContext
characters, cleanup, endDocument, endElement, getAttribute, getLocalname, getNamespaceURI, getQname, startDocument, startElement, tagCleanup
-
-
-
-
Constructor Detail
-
XMLWriterContext
public XMLWriterContext(XMLStream theStream, java.lang.String namespaceURI, java.lang.String localname, java.lang.String qname, org.xml.sax.Attributes theseAttributes, java.io.Writer writer)
Full constructor. Used for individual tags.
-
-
Method Detail
-
flush
public void flush() throws ManifoldCFExceptionFlush the data to the underlying output stream- Throws:
ManifoldCFException
-
tagContents
protected void tagContents(char[] ch, int start, int length) throws ManifoldCFExceptionThis method is meant to be extended by classes that extend this class- Overrides:
tagContentsin classXMLContext- Throws:
ManifoldCFException
-
beginTag
protected XMLContext beginTag(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws ManifoldCFException, ServiceInterruption
Start a child tag. The XMLWriterContext accepts all subtags in their text form.- Overrides:
beginTagin classXMLContext- Throws:
ManifoldCFExceptionServiceInterruption
-
endTag
protected void endTag() throws ManifoldCFException, ServiceInterruptionEnd a child tag. The XMLWriterContext accepts all subtags in their text form.- Overrides:
endTagin classXMLContext- Throws:
ManifoldCFExceptionServiceInterruption
-
escapeAttribute
protected static java.lang.String escapeAttribute(java.lang.String value)
Convert a string to a value that's safe to include inside an attribute value
-
escapeCharData
protected static void escapeCharData(char[] chars, int start, int length, java.io.Writer out) throws java.io.IOExceptionEscapes sequence of characters to output writer- Throws:
java.io.IOException
-
-