Class SimpleHandler

java.lang.Object
com.singularsys.extensions.mathml.parser.SimpleHandler
All Implemented Interfaces:
TagHandler

public class SimpleHandler extends Object implements TagHandler
A simple handler which converts all elements to a tree structure. The inner class TreeNode represents elements of the tree and the standard output format from the toString method is such that
<math><apply><plus/><ci>x</ci><cn type="real">3</cn></apply></math>
becomes
math
 -apply
 --plus
 --ci
 ---x
 --cn {type=real}
 ---3
  • Constructor Details

    • SimpleHandler

      public SimpleHandler()
  • Method Details

    • handle

      public Object handle(StackFrame frame, Locator loc)
      Description copied from interface: TagHandler
      Transform the element, called when a closing tag is encountered.
      Specified by:
      handle in interface TagHandler
      Parameters:
      frame - StackFrame representing the element
      loc - location in input
      Returns:
      typically a Node, other types of objects may also be returned when the tag has a special meaning for its parent node.