Return the SAXParser we will use to parse the input stream. @return the SAXParser we will use to parse the input stream. If there is a problem creating the parser, return null .
()
| 778 | * <code>null</code>. |
| 779 | */ |
| 780 | public SAXParser getParser() { |
| 781 | |
| 782 | // Return the parser we already created (if any) |
| 783 | if (parser != null) { |
| 784 | return parser; |
| 785 | } |
| 786 | |
| 787 | // Create a new parser |
| 788 | try { |
| 789 | parser = getFactory().newSAXParser(); |
| 790 | } catch (Exception e) { |
| 791 | log.error(sm.getString("digester.createParserError"), e); |
| 792 | return null; |
| 793 | } |
| 794 | |
| 795 | return parser; |
| 796 | } |
| 797 | |
| 798 | |
| 799 | /** |
no test coverage detected