// <filter-mapping> <filter-name>WicketFilter</filter-name>
// <url-pattern>/*</url-pattern> <...> <filter-mapping>
try
{
ArrayList urlPatterns = new ArrayList();
XmlPullParser parser = new XmlPullParser();
parser.parse(is);
while (true)
{
XmlTag elem;
do
{
elem = (XmlTag)parser.nextTag();
}
while (elem != null && (!(elem.getName().equals(mapping) && elem.isOpen())));
if (elem == null)
break;
String encounteredFilterName = null, urlPattern = null;
do
{
elem = (XmlTag)parser.nextTag();
if (elem.isOpen())
{
parser.setPositionMarker();
}
else if (elem.isClose() && elem.getName().equals(name))
{
encounteredFilterName = parser.getInputFromPositionMarker(elem.getPos())
.toString();
}
else if (elem.isClose() && elem.getName().equals("url-pattern"))
{
urlPattern = parser.getInputFromPositionMarker(elem.getPos()).toString();
}
}
while (urlPattern == null || encounteredFilterName == null);
if (filterName.equals(encounteredFilterName))