1 2 3 24 package com.geinuke.util; 25 import org.w3c.dom.Element ; 26 import org.w3c.dom.NodeList ; 27 28 import com.geinuke.common.NukePluginI; 29 import com.magic.util.xml.DOMUtil; 30 import com.magic.util.xml.XMLParser; 31 32 33 public class PluginConfigParser extends XMLParser { 34 35 36 public Object parseElement(Element element) throws Exception { 37 NukePluginI plugin=null; 38 Element el=null, 39 elem=null; 40 NodeList nodes = null; 41 42 43 el=element; 45 String name=DOMUtil.getSimpleElementText(el,"name"); 46 47 String clazz=DOMUtil.getSimpleElementText(el,"plugin-class"); 48 49 50 plugin=(NukePluginI)Class.forName(clazz).newInstance(); 51 52 53 return plugin; 54 } 55 56 } 57 | Popular Tags |