Class CompactXmlSerializer


public class CompactXmlSerializer extends XmlSerializer

Compact XML serializer - creates resulting XML by stripping whitespaces.

  • Constructor Details

  • Method Details

    • serialize

      protected void serialize(TagNode tagNode, Writer writer) throws IOException
      Specified by:
      serialize in class Serializer
      Throws:
      IOException
    • isWhitespaceString

      private boolean isWhitespaceString(Object object)
      Checks whether specified object's string representation is empty string (containing of only whitespaces).
      Parameters:
      object - Object whose string representation is checked
      Returns:
      true, if empty string, false otherwise