Class CompactXmlSerializer

java.lang.Object
io.sf.carte.echosvg.svggen.CompactXmlSerializer
All Implemented Interfaces:
XmlSerializer

public class CompactXmlSerializer extends Object implements XmlSerializer
Compact SVG serialization.
  • Constructor Details

    • CompactXmlSerializer

      public CompactXmlSerializer()
  • Method Details

    • serializeXML

      public void serializeXML(Node node, Writer writer, boolean escaped) throws IOException, SVGGraphics2DRuntimeException
      Description copied from interface: XmlSerializer
      Serialize the given XML node to the given writer.

      Callers of this method should catch RuntimeException in addition to the SVGGraphics2DRuntimeException.

      Specified by:
      serializeXML in interface XmlSerializer
      Parameters:
      node - the node to serialize.
      writer - the writer to write the serialization output.
      escaped - defines if the characters in Text nodes and attribute values should be escaped.
      Throws:
      IOException - if an I/O error occurs.
      SVGGraphics2DRuntimeException - or other runtime exception if the node hierarchy is inconsistent or contains unknown nodes.
    • writeDocumentType

      public void writeDocumentType(Writer out, String name, String publicId, String systemId) throws IOException
      Description copied from interface: XmlSerializer
      Serialize a document type with the given identifiers.
      Specified by:
      writeDocumentType in interface XmlSerializer
      Parameters:
      out - the writer to write the serialization output.
      name - the document type name.
      publicId - the public identifier, or null if none.
      systemId - the system identifier, or null if none.
      Throws:
      IOException - if an I/O error occurs.