View Javadoc

1   package com.sun.syndication.io;
2   
3   import org.jdom.JDOMException;
4   import org.xml.sax.XMLReader;
5   
6   /*
7    *  This code is needed to fix the security problem outlined in http://www.securityfocus.com/archive/1/297714
8    * 
9    * Unfortunately there isn't an easy way to check if an XML parser supports a particular feature, so
10   * we need to set it and catch the exception if it fails. We also need to subclass the JDom SAXBuilder 
11   * class in order to get access to the underlying SAX parser - otherwise the features don't get set until
12   * we are already building the document, by which time it's too late to fix the problem.
13   * 
14   * Crimson is one parser which is known not to support these features.
15   * 
16   */
17  public class SAXBuilder extends org.jdom.input.SAXBuilder {
18  
19  	public SAXBuilder(boolean _validate) {
20  		super(_validate);
21  	}
22  
23  	public XMLReader createParser() throws JDOMException {
24  		return super.createParser();
25  	}
26  	
27  }