| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
NamespaceStack
is a helper class used by both
XMLOutputter
and
SAXOutputter
to manage namespaces
in a JDOM Document during output.
Constructor Summary | |
NamespaceStack() This creates the needed storage. |
Method Summary | |
String | getURI(String prefix) Given a prefix, this will return the namespace URI most rencently (topmost) associated with that prefix. |
String | pop() This will remove the topmost (most recently added) Namespace , and return its prefix. |
void | printStack() This will print out the size and current stack, from the most recently added Namespace to
the "oldest," all to System.out . |
void | push(Namespace ns) This will add a new Namespace
to those currently available. |
int | size() This returns the number of available namespaces. |
Constructor Detail |
public NamespaceStack()
This creates the needed storage.
Method Detail |
public String getURI(String prefix)
Given a prefix, this will return the namespace URI most rencently (topmost) associated with that prefix.
String
namespace prefix.String
- the namespace URI for that prefix.public String pop()
This will remove the topmost (most recently added)
Namespace
, and return its prefix.
String
- the popped namespace prefix.public void printStack()
This will print out the size and current stack, from the
most recently added Namespace
to
the "oldest," all to System.out
.
public void push(Namespace ns)
This will add a new Namespace
to those currently available.
Namespace
to add.public int size()
This returns the number of available namespaces.
int
- size of the namespace stack.Association Links |
to Class java.util.Stack
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |