Class Parser.XmlSerializer

java.lang.Object
de.bottlecaps.markup.blitz.Parser.XmlSerializer
All Implemented Interfaces:
ResultHandler
Enclosing class:
Parser

private static class Parser.XmlSerializer extends Object implements ResultHandler
  • Field Details

    • INDENTATION

      private static final String INDENTATION
      See Also:
    • out

      private StringBuilder out
    • depth

      private int depth
    • delayedTag

      private boolean delayedTag
    • indent

      private boolean indent
    • hasChildElement

      private boolean hasChildElement
  • Constructor Details

    • XmlSerializer

      public XmlSerializer(StringBuilder out, boolean indent)
  • Method Details

    • startElement

      public void startElement(String name)
      Description copied from interface: ResultHandler
      Reports the start of an element.
      Specified by:
      startElement in interface ResultHandler
      Parameters:
      name - the element name
    • endElement

      public void endElement(String name)
      Description copied from interface: ResultHandler
      Reports the end of an element.
      Specified by:
      endElement in interface ResultHandler
      Parameters:
      name - the element name
    • attribute

      public void attribute(String name, int[] codepoints, int length)
      Description copied from interface: ResultHandler
      Reports an attribute, with its value given as codepoints.
      Specified by:
      attribute in interface ResultHandler
      Parameters:
      name - the attribute name
      codepoints - the codepoints holding the attribute value
      length - the number of codepoints in the value
    • text

      public void text(int[] codepoints, int length)
      Description copied from interface: ResultHandler
      Reports a run of codepoints of element content.
      Specified by:
      text in interface ResultHandler
      Parameters:
      codepoints - the Unicode code points
      length - the number of codepoints to report