Class mxSaxOutputHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.mxgraph.reader.mxSaxOutputHandler
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
XMLReader reader = SAXParserFactory.newInstance().newSAXParser()
.getXMLReader();
reader.setContentHandler(new mxSaxExportHandler(
new mxGraphicsExportCanvas(g2)));
reader.parse(new InputSource(new StringReader(xml)));
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected mxICanvas2Dprotected Map<String, mxSaxOutputHandler.IElementHandler> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the canvas for rendering.protected StringgetValue(Attributes atts, String name, String defaultValue) Returns the given attribute value or an empty string.protected voidvoidsetCanvas(mxICanvas2D value) Sets the canvas for rendering.voidstartElement(String uri, String localName, String qName, Attributes atts) Methods inherited from class DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
canvas
-
handlers
-
-
Constructor Details
-
mxSaxOutputHandler
-
-
Method Details
-
setCanvas
Sets the canvas for rendering. -
getCanvas
Returns the canvas for rendering. -
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
initHandlers
protected void initHandlers() -
getValue
Returns the given attribute value or an empty string.
-