Java Code Examples for org.jdom.input.SAXBuilder#setXMLFilter()
The following examples show how to use
org.jdom.input.SAXBuilder#setXMLFilter() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CreoleRegisterImpl.java From gate-core with GNU Lesser General Public License v3.0 | 6 votes |
/** * Default constructor. Sets up directory files parser. <B>NOTE:</B> only * Factory should call this method. */ public CreoleRegisterImpl() throws GateException { // initialise the various maps lrTypes = new HashSet<String>(); prTypes = new HashSet<String>(); vrTypes = new LinkedList<String>(); toolTypes = new HashSet<String>(); applicationTypes = new HashSet<String>(); plugins = new LinkedHashSet<Plugin>(); // construct a SAX parser for parsing the CREOLE directory files jdomBuilder = new SAXBuilder(false); jdomBuilder.setXMLFilter(new CreoleXmlUpperCaseFilter()); // read plugin name mappings file readPluginNamesMappings(); }
Example 2
Source File: XMLProperties.java From jivejdon with Apache License 2.0 | 5 votes |
/** * Creates a new XMLProperties object. * * @parm file the full path the file that properties should be read from and * written to. */ public XMLProperties(String fileName) { try { SAXBuilder builder = new SAXBuilder(); // Strip formatting DataUnformatFilter format = new DataUnformatFilter(); builder.setXMLFilter(format); doc = builder.build(new File(fileName)); } catch (Exception e) { System.err.println("Error creating XML parser in " + "PropertyManager.java" + " fileName=" + fileName); e.printStackTrace(); } }
Example 3
Source File: XMLProperties.java From jivejdon with Apache License 2.0 | 5 votes |
/** * Creates a new XMLProperties object. * * @parm file the full path the file that properties should be read from and * written to. */ public XMLProperties(InputStream inputStream) { try { SAXBuilder builder = new SAXBuilder(); // Strip formatting DataUnformatFilter format = new DataUnformatFilter(); builder.setXMLFilter(format); doc = builder.build(inputStream); } catch (Exception e) { System.err.println("Error creating XML parser in " + "PropertyManager.java" + " fileName=" + inputStream.toString()); e.printStackTrace(); } }
Example 4
Source File: XMLProperties.java From jivejdon with Apache License 2.0 | 5 votes |
public XMLProperties(Reader reader) { try { SAXBuilder builder = new SAXBuilder(); // Strip formatting DataUnformatFilter format = new DataUnformatFilter(); builder.setXMLFilter(format); doc = builder.build(reader); } catch (Exception e) { System.err.println("Error creating XML parser in " + "PropertyManager.java" + " fileName=" + reader.toString()); e.printStackTrace(); } }