{
Parser p = (Parser) ObjectUtilities.loadAndInstantiate
(parserClass, CSSParserFactory.class, Parser.class);
if (p != null)
{
p.setConditionFactory(new FixNamespaceConditionFactory(new CSSConditionFactory()));
p.setSelectorFactory(new FixNamespaceSelectorFactory(new CSSSelectorFactory()));
return p;
}
}
try
{
Parser p = new ParserFactory().makeParser();
if (p == null)
{
return null;
}
p.setConditionFactory(new FixNamespaceConditionFactory(new CSSConditionFactory()));
p.setSelectorFactory(new FixNamespaceSelectorFactory(new CSSSelectorFactory()));
return p;
}
catch (Exception e)
{