Class XMLDocument

All Implemented Interfaces:
Serializable, Document, StyledDocument

public class XMLDocument extends DefaultStyledDocument
Styled document holding an XML structure as nested tag elements (see XMLReader). The document is read-only for the user: text is only inserted or removed while user changes are switched off.
Author:
Stanislav Lapitsky
See Also:
  • Field Details

    • TAG_ELEMENT

      public static String TAG_ELEMENT
      element name of a tag (start row, children, end row)
    • TAG_ROW_START_ELEMENT

      public static String TAG_ROW_START_ELEMENT
      element name of the start row of a tag and of text/comment rows
    • TAG_ROW_END_ELEMENT

      public static String TAG_ROW_END_ELEMENT
      element name of the end row of a tag
    • BRACKET_ATTRIBUTES

      public static SimpleAttributeSet BRACKET_ATTRIBUTES
      style of brackets, = and quotes
    • TAGNAME_ATTRIBUTES

      public static SimpleAttributeSet TAGNAME_ATTRIBUTES
      style of tag names (bold, dark green)
    • ATTRIBUTENAME_ATTRIBUTES

      public static SimpleAttributeSet ATTRIBUTENAME_ATTRIBUTES
      style of attribute names (bold)
    • ATTRIBUTEVALUE_ATTRIBUTES

      public static SimpleAttributeSet ATTRIBUTEVALUE_ATTRIBUTES
      style of attribute values (italic, blue)
    • PLAIN_ATTRIBUTES

      public static SimpleAttributeSet PLAIN_ATTRIBUTES
      style of text content (smaller, dark gray)
    • COMMENT_ATTRIBUTES

      public static SimpleAttributeSet COMMENT_ATTRIBUTES
      style of comments (smaller, gray, italic)
  • Constructor Details

    • XMLDocument

      public XMLDocument()
      Creates an empty document.
  • Method Details