Skip to content

Instantly share code, notes, and snippets.

@sourcerebels
Created April 7, 2011 06:06
Show Gist options
  • Save sourcerebels/907132 to your computer and use it in GitHub Desktop.
Save sourcerebels/907132 to your computer and use it in GitHub Desktop.
Código muy cerdo que permite ver de que jars está cogiendo los parsers XML (Xalan y Xerces)
Transformer processor = null;
DocumentBuilder db = null;
try {
processor = TransformerFactory.newInstance().newTransformer();
db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
} catch (Exception e) {}
URL url1 = processor.getClass().getResource("TransformerImpl.class");
URL url2 = db.getClass().getResource("DocumentBuilderImpl.class");
if (url1 != null) {
System.out.println("XALAN: " + processor.getClass().getName() + "--" + url1.toString());
}
if (url2 != null) {
System.out.println("XERCES: " + db.getClass().getName() + "--" + url2.toString());
}
if (System.getProperty("javax.xml.soap.MessageFactory") != null) {
System.out.println("javax.xml.soap.MessageFactory: " +
System.getProperty("javax.xml.soap.MessageFactory"));
}
if (System.getProperty("javax.xml.soap.SOAPConnectionFactory") != null) {
System.out.println("javax.xml.soap.SOAPConnectionFactory: " +
System.getProperty("javax.xml.soap.SOAPConnectionFactory"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment