Class XMLStandaloneElement

java.lang.Object
com.lucaskjaerozhang.wikitext_parser.ast.base.WikiTextNode
com.lucaskjaerozhang.wikitext_parser.ast.layout.XMLStandaloneElement
All Implemented Interfaces:
WikiTextElement

public class XMLStandaloneElement extends WikiTextNode implements WikiTextElement
An XML node with no children. In WikiText, you can pass through HTML or special xml tags. This handles them as a group. Examples: - blockquote - poem
  • Constructor Details

    • XMLStandaloneElement

      public XMLStandaloneElement(String tag, List<NodeAttribute> attributes)
      Creates an XML node with no children.
      Parameters:
      tag - The XML tag.
      attributes - Any xml attributes.
  • Method Details

    • accept

      public <T> Optional<T> accept(WikiTextASTVisitor<T> visitor)
      Description copied from class: WikiTextNode
      Hook for an AST visitor.
      Specified by:
      accept in class WikiTextNode
      Type Parameters:
      T - Whatever the visitor produces.
      Parameters:
      visitor - The visitor doing the visitor.
      Returns:
      Whatever the visitor produced.