Class SyntaxXML


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

      • SyntaxXML

        public SyntaxXML()
    • Method Detail

      • 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