* @param visitor The <code>NodeVisitor</code> object to be signalled
* for each child and possibly this tag.
*/
public void accept (NodeVisitor visitor)
{
SimpleNodeIterator children;
Node child;
if (visitor.shouldRecurseSelf ())
visitor.visitTag (this);
if (visitor.shouldRecurseChildren ())
{
if (null != getChildren ())
{
children = children ();
while (children.hasMoreNodes ())
{
child = children.nextNode ();
child.accept (visitor);
}
}
if ((null != getEndTag ()) && (this != getEndTag ())) // 2nd guard handles <tag/>
getEndTag ().accept (visitor);