Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tomcat.util.xml
Interface SaxContext

All Known Implementing Classes:
  XmlMapper

public interface SaxContext

SAX Context - used to match and perform actions provide access to the current stack and XML elements. We maintain a stack with all elements and their attributes. We also support a stack of objects that can be used as in a stack-based programming language.

Author:
  costin@dnt.ro

Method Summary
`java.lang.Object` | `currentObject()`
`org.xml.sax.AttributeList` | `getAttributeList(int pos)` Random access to attributes of a particular element.
`java.lang.String` | `getBody()` Body of the last tag.
`java.lang.ClassLoader` | `getClassLoader()`
`org.xml.sax.AttributeList` | `getCurrentAttributes()` Attributes of the current tag
`java.lang.String` | `getCurrentElement()` Current element
`int` | `getDebug()`
`XmlMapper` | `getMapper()`
`java.util.Stack` | `getObjectStack()` Deprecated.
`java.lang.Object` | `getRoot()` The root object is either set by caller before starting the parse or can be created using the first tag.
`java.lang.String` | `getTag(int pos)` Random Access a particular parent element XXX getElement() is a better name
`int` | `getTagCount()` Depth of the tag stack.
`java.lang.Object` | `getVariable(java.lang.String s)`
`void` | `log(java.lang.String s)`
`java.lang.Object` | `popObject()`
`java.lang.Object` | `previousObject()`
`void` | `pushObject(java.lang.Object o)`
`void` | `setVariable(java.lang.String s, java.lang.Object v)`

Method Detail

### getBody

    public java.lang.String getBody()

  Body of the last tag.

### getCurrentAttributes

    public org.xml.sax.AttributeList getCurrentAttributes()

  Attributes of the current tag

### getCurrentElement

    public java.lang.String getCurrentElement()

  Current element

### getTagCount

    public int getTagCount()

  Depth of the tag stack. XXX getElementDepth() ?

### getAttributeList

    public org.xml.sax.AttributeList getAttributeList(int pos)

  Random access to attributes of a particular element.

### getTag

    public java.lang.String getTag(int pos)

  Random Access a particular parent element XXX getElement() is a better name

### pushObject

    public void pushObject(java.lang.Object o)

### popObject

    public java.lang.Object popObject()

### currentObject

    public java.lang.Object currentObject()

### previousObject

    public java.lang.Object previousObject()

### getRoot

    public java.lang.Object getRoot()

  The root object is either set by caller before starting the parse or can be created using the first tag. It is used to set object in the result graph by navigation ( using root and a path). Please use the stack, it's much faster and better.

### getObjectStack

    public java.util.Stack getObjectStack()

  Deprecated.

  We maintain a stack to keep java objects that are generated as result of parsing. You can either use the stack ( which is very powerfull construct !), or use the root object and navigation in the result tree.

### getDebug

    public int getDebug()

### log

    public void log(java.lang.String s)

### getMapper

    public XmlMapper getMapper()

### setVariable

    public void setVariable(java.lang.String s,
                            java.lang.Object v)

### getVariable

    public java.lang.Object getVariable(java.lang.String s)

### getClassLoader

    public java.lang.ClassLoader getClassLoader()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Apache Software Foundation. All Rights Reserved.