public int doEndTag() throws JspException
{
try {
PageContextImpl pageContext = (PageContextImpl) this.pageContext;
BodyContentImpl body = (BodyContentImpl) getBodyContent();
XMLReader xmlReader = null;
Reader reader = null;
InputSource is;
if (_xml != null) {
Object obj = _xml;
if (obj instanceof Reader) {
reader = (Reader) obj;
is = new InputSource(reader);
}
else if (obj instanceof String) {
reader = Vfs.openString((String) obj).getReader();
is = new InputSource(reader);
} else if (obj instanceof XMLReader) {
xmlReader = (XMLReader) obj;
is = new InputSource();
}
else
throw new JspException(L.l("xml must be java.io.Reader, String or org.xml.sax.XMLReader at `{0}'",
obj));
}
else if (body != null) {
TempCharReader tempReader = (TempCharReader) body.getReader();
int ch;
while (Character.isWhitespace((ch = tempReader.read()))) {
}