+ if (System.getProperty("java.version").indexOf("1.6") > -1
+ || System.getProperty("java.version").indexOf("1.5") > -1)
+ {
+ // patch for 'This parser does not support specification "null" version
+ // "null"' error
+ // this hack ensures we get a properly updated SAXParserFactory on older
+ // JVMs
+ // thanks to Stefan Birkner over at https://coderwall.com/p/kqsrrw
+ System.setProperty("javax.xml.parsers.SAXParserFactory",
+ "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl");
+ }
+ // rather than lose exception semantics whilst parsing RNAML with VARNA we
+ // wrap the routine and catch all exceptions before passing them up the
+ // chain as an IOException