Class SyntaxXML

java.lang.Object
org.basex.gui.text.SyntaxXML

public final class SyntaxXML extends Object
This class defines syntax highlighting for XML files.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • SyntaxXML

      public SyntaxXML()
  • Method Details

    • init

      public void init(Color color)
      Initializes the highlighter.
      Parameters:
      color - default color
    • getColor

      public Color getColor(org.basex.gui.text.TextIterator iter)
      Returns the color for the current token.
      Parameters:
      iter - iterator
      Returns:
      color
    • commentOpen

      public byte[] commentOpen()
      Returns the start of a comment.
      Returns:
      comment start
    • commentEnd

      public byte[] commentEnd()
      Returns the end of a comment.
      Returns:
      comment end
    • format

      public byte[] format(byte[] string, byte[] spaces)
      Returns a formatted version of a string.
      Parameters:
      string - string to be formatted
      spaces - spaces
      Returns:
      formatted string