Class Section

    • Constructor Detail

      • Section

        public Section()
        Initializes the tag.
      • Section

        public Section​(String title)
        Initializes the tag.
        Parameters:
        title - the title of this section
      • Section

        public Section​(String title,
                       String content)
        Initializes the tag.
        Parameters:
        title - the title of this section
        content - the content of the section (inside "para" tags)
    • Method Detail

      • removeParagraphs

        protected void removeParagraphs​(boolean onlyEmpty)
        Removes "para" elements.
        Parameters:
        onlyEmpty - whether to remove only empty paragraphs
      • setContent

        public void setContent​(String content)
        Sets the content that gets enclosed in "para" tags. Lines are automatically split at line feeds and added as separate "para" tags.
        Parameters:
        content - the content to add
      • doValidate

        protected void doValidate()
        Hook method for validating/fixing the XML tree.

        Inserts a dummy paragraph if no nested section paragraphs available.
        Overrides:
        doValidate in class AbstractTag