ProgramixGenericLib v5.0.1

Class SimpleTagHandler

  extended by com.programix.saxplus.BaseTagHandler
      extended by com.programix.saxplus.SimpleTagHandler
All Implemented Interfaces:

public class SimpleTagHandler
extends BaseTagHandler
implements TagHandler

Used to gather a single value from a tag--a very common case. Used when a tag has either:

Paul Hyde

Constructor Summary
Method Summary
 Value getResult()
          This implementation returns ValueFactory.NULL_INSTANCE.
 void startTag(NameDetail tagName, AttributeGroup attr)
 void text(Value tagText)
          Delivers textual content within this tag.
Methods inherited from class com.programix.saxplus.BaseTagHandler
endSubTag, endTag, getSubTagHandler, getSubTagHandler, setSubTagHandler, setSubTagHandler, startSubTag
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.programix.saxplus.TagHandler
endSubTag, endTag, startSubTag

Constructor Detail


public SimpleTagHandler()
Method Detail


public void startTag(NameDetail tagName,
                     AttributeGroup attr)
Specified by:
startTag in interface TagHandler
startTag in class BaseTagHandler


public void text(Value tagText)
Description copied from interface: TagHandler
Delivers textual content within this tag. If this tag has no sub tags, then this method is called at most once. If this tag is empty or has no text other than whitespace, this method is not called. If this tag has sub tags and only whitespace between the sub tags, this method is not called. If there is a mixture of (non-whitespace) text and sub tags, this method is called multiple times.

For example:

     <excellent>Red Delicious</excellent>
     <good>Granny Smith</good>
 <fresh value="yes" />
 <story>They are <bold>very</bold> tasty.</story>
The text() method is called:

Specified by:
text in interface TagHandler
text in class BaseTagHandler


public Value getResult()
Description copied from class: BaseTagHandler
This implementation returns ValueFactory.NULL_INSTANCE. Overridden by subclasses as appropriate.

Specified by:
getResult in interface TagHandler
getResult in class BaseTagHandler
the value calculated, never null.

ProgramixGenericLib v5.0.1

Copyright © 2001-2009 Programix Incorporated. All rights reserved. ProgramixGenericLib is free and is OSI Certified Open Source Software under the BSD license.