getXMLRepresentation() returns an object’s data as an XML document.
- By Oliver Brüning
- April 24, 2001
COMPONENT JAVA
X4Dialog: Help for Dynamic Web Sites
Oliver Brüning
Listing 3. getXMLRepresentation() returns an object’s data as an XML document.
package bruening.x4dialog;
import org.w3c.dom.Document;
public class ModelXMLFromFile implements X4DialogModelIF
{
private Document xmlDoc = null;
public ModelXMLFromFile()
{
super();
}
public ModelXMLFromFile(String fileName)
{
this();
loadXMLFromFile(fileName);
}
public Document getXMLRepresentation()
{
return xmlDoc;
}
public void loadXMLFromFile(String fileName)
{
xmlDoc = XMLUtils.getXMLDocFromFile(X4DialogPropertiesIF.HOME + fileName);
}
}