{
super();
namespaces = new XMLNamespaces();
- pool = new FoXMLEventPool(namespaces);
+ pool = new FoXMLEventPool(namespaces, DEFAULTBUFSIZE);
}
/**
! (ev.type == eventType
&& ev.uriIndex == uriIndex
&& ev.localName.equals(localName))) {
+ pool.surrenderEvent(ev);
ev = getEvent();
}
if (ev == null)
FoXMLEvent ev = getEvent();
while (ev != null &&
! (ev.type == eventType && ev.foType == foType)) {
+ pool.surrenderEvent(ev);
ev = getEvent();
}
if (ev == null)
if (discardWhiteSpace) {
while (ev != null && ev.type == XMLEvent.CHARACTERS
&& ev.chars.trim().equals("")) {
+ pool.surrenderEvent(ev);
ev = getEvent();
}
}
if (discardWhiteSpace) {
while (ev != null && ev.type == XMLEvent.CHARACTERS
&& ev.chars.trim().equals("")) {
+ pool.surrenderEvent(ev);
ev = getEvent();
}
}
if (discardWhiteSpace) {
while (ev != null && ev.type == XMLEvent.CHARACTERS
&& ev.chars.trim().equals("")) {
+ pool.surrenderEvent(ev);
ev = getEvent();
}
}
if (discardWhiteSpace) {
while (ev != null && ev.type == XMLEvent.CHARACTERS
&& ev.chars.trim().equals("")) {
+ pool.surrenderEvent(ev);
ev = getEvent();
}
}
// getEvent() returns null, the expectStartElement() calls
// return null.
ev = getEvent();
+ pool.surrenderEvent(ev);
} while (ev != null);
// Exit from this while loop is only by discovery of null event
throw new NoSuchElementException
// getEvent() returns null, the expectStartElement() calls
// will throw a NoSuchElementException
ev = getEvent();
+ pool.surrenderEvent(ev);
} while (ev != null);
// Exit from this while loop is only by discovery of null event
throw new NoSuchElementException
// getEvent() returns null, the expectStartElement() calls
// will throw a NoSuchElementException
ev = getEvent();
+ pool.surrenderEvent(ev);
} while (ev != null);
// Exit from this while loop is only by discovery of null event
throw new NoSuchElementException
// getEvent() returns null, the expectStartElement() calls
// will throw a NoSuchElementException
ev = getEvent();
+ pool.surrenderEvent(ev);
} while (ev != null);
// Exit from this while loop is only by discovery of null event
throw new NoSuchElementException
FoXMLEvent ev;
do {
try {
- ev = expectStartElement(set, discardWhiteSpace);
- if (ev != null) return ev;
- // The non-matching event has been pushed back.
- // Get it and discard. Note that if the first attempt to
- // getEvent() returns null, the expectStartElement() calls
- // will throw a NoSuchElementException
- ev = getEvent();
+ ev = expectStartElement(set, discardWhiteSpace);
+ if (ev != null) return ev;
+ // The non-matching event has been pushed back.
+ // Get it and discard. Note that if the first attempt to
+ // getEvent() returns null, the expectStartElement() calls
+ // will throw a NoSuchElementException
+ ev = getEvent();
+ pool.surrenderEvent(ev);
} catch(UnexpectedStartElementException e) {
ev = getEvent();
+ pool.surrenderEvent(ev);
}
} while (ev != null);
// Exit from this while loop is only by discovery of null event
public FoXMLEvent getCharacters() throws FOPException {
FoXMLEvent ev = getEvent();
while (ev != null && ev.type != XMLEvent.CHARACTERS) {
+ pool.surrenderEvent(ev);
ev = getEvent();
}
if (ev == null) {