1 package net.sourceforge.xmlfit.data.impl;
2
3 import net.sourceforge.xmlfit.data.DataSet;
4
5 import org.w3c.dom.Node;
6 import org.w3c.dom.NodeList;
7
8 public class XMLDataSetImpl implements DataSet {
9
10 private Node dataSetNode;
11
12 public XMLDataSetImpl(Node node)
13 {
14 this.dataSetNode = node;
15 }
16
17 public String getPropertyValue(String name)
18 {
19 NodeList childNodes = dataSetNode.getChildNodes();
20 for (int i = 0; i < childNodes.getLength(); i++) {
21 Node node = childNodes.item(i);
22 if(node.getNodeName().equals(name))
23 {
24 return node.getTextContent();
25 }
26 }
27 return null;
28 }
29
30 }