Method Summary |
|
public StringBuffer | appendPath(StringBuffer buffer) Appends the current context path to a
StringBuffer .
Parameters: buffer - The buffer to which to append the context path. |
public int | attributeCount() Returns the number of attributes defined in this context. |
public boolean | attributeExists(QName name) Determines if an attribute with the specified name exists in this context.
Parameters: name - The name of the attribute. |
public Iterator | attributeNames() Returns an
Iterator over the names of all attributes defined in this
context. |
public String | getAttribute(int idx) Returns the value of the idx th attribute defined on
the context.
Parameters: idx - The zero-based index of the attribute value to retrieve. |
public String | getAttribute(QName name) Returns the value of a named attribute.
Parameters: name - The name of the attribute value to retrieve. |
public QName | getAttributeName(int idx) Returns the name of the idx th attribute defined on
the context.
Parameters: idx - The zero-based index of the attribute name to retrieve. |
public int | getDepth() Determines the number of enclosing contexts. |
public QName | getName() Returns the qualified name associated with the context. |
public String | getNamespacePrefix(int idx) Returns the prefix of the idx th namespace declaration
defined in this context.
Parameters: idx - The index of the namespace prefix to return. |
public String | getNamespaceURI(int idx) Returns the URI of the idx th namespace declaration
defined in this context.
Parameters: idx - The index of the namespace URI to return. |
public ElementContext | getParentContext() Returns a reference to the enclosing ElementContext . |
public String | getPath() Returns the current context path. |
public boolean | isEmpty() Whether this context represents an emtpy element. |
public boolean | isReadOnly() Whether this context may be edited or not. |
public boolean | isRoot() Determines if this context has an enclosing context or not. |
public int | namespaceCount() Determines the number of namespaces declared in this context. |
public ElementContext | newSubContext(QName name) Constructs a new child ElementContext with the specified name.
Parameters: name - The name associated with the child context. |
public ElementContext | newSubContext(QName name, boolean isEmpty) Constructs a new child ElementContext with the specified name
and empty value.
Parameters: name - The name associated with the child context. Parameters: isEmpty - Whether the child context represents an empty element. |
public void | putAttribute(QName name, String value) Adds an attribute to the context with the specified name and value. |
public void | putNamespace(String prefix, String nsURI) Adds a namespace declaration to this context with the specified prefix and
namespace uri. |
public void | setReadOnly() Prevents any further additions to this context. |
public String | toString() |