Ripped out stale 1.3 XML parsing code.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 18 Sep 2006 19:47:58 +0000 (19:47 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 18 Sep 2006 19:47:58 +0000 (19:47 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2032 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/IdPConfigLoader.java

index 49610dc..d9eb7ca 100644 (file)
 package edu.internet2.middleware.shibboleth.idp;
 
 import javax.servlet.ServletContext;
+import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.apache.log4j.Logger;
 import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
 
+import edu.internet2.middleware.shibboleth.common.ShibResource;
 import edu.internet2.middleware.shibboleth.common.ShibbolethConfigurationException;
-import edu.internet2.middleware.shibboleth.xml.Parser;
 
 /**
  * Constructs a DOM tree for the IdP configuration XML file.
@@ -80,7 +82,13 @@ public class IdPConfigLoader {
                }
 
                try {
-                       idpConfig = Parser.loadDom(configFileLocation, true);
+
+                       DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+                       factory.setValidating(false);
+                       factory.setNamespaceAware(true);
+
+                       idpConfig = factory.newDocumentBuilder().parse(
+                                       new InputSource(new ShibResource(configFileLocation).getInputStream()));
 
                        if (idpConfig == null) { throw new Exception("IdP configuration could not be loaded from (" + idpConfigFile
                                        + ")."); }
@@ -110,9 +118,10 @@ public class IdPConfigLoader {
                return getIdPConfig(getIdPConfigFile(context));
 
        }
-    
-    protected static void reset() {
-        idpConfig = null;
-        idpConfigFile = null;
-    }
+
+       protected static void reset() {
+
+               idpConfig = null;
+               idpConfigFile = null;
+       }
 }