1
2
3
4
5
6
7
8
9
10 package org.astrogrid.test;
11
12 import org.w3c.dom.Document;
13 import org.w3c.dom.Element;
14
15 import javax.xml.parsers.*;
16 import org.astrogrid.xmlutils.*;
17
18 import org.astrogrid.tools.xml.EasyDomLoader;
19 import java.io.IOException;
20
21 import org.astrogrid.log.Log;
22
23 /***
24 * Configuration node loader - reads from an XML file, and returns the
25 * node corresponding to the Config parameters. Used as part of test harnesses
26 * - normally Axis will pass this node already-loaded to the wrapper
27
28 * @author : M Hill
29 */
30 public class ConfigElementLoader
31 {
32
33 /***
34 * Loads and returns the 'configParams' DOM node (Element) from the given
35 * XML file
36 */
37 public static Element loadElement(String filename) throws IOException
38 {
39 Element rootNode = EasyDomLoader.loadElement(filename);
40
41
42
43 Element configNode = rootNode;
44
45 return configNode;
46 }
47
48 }
49