at.woli.xml
Class XMLFileWriter

java.lang.Object
  extended by at.woli.xml.XMLFileWriter

public class XMLFileWriter
extends Object

XMLFileWriter writes all elements of an given list to a file.

Version:
1.0.0
Author:
Wolfgang Nitzlnader

Field Summary
private  XMLData xmlFileData
          XMLData Object which stores all elements and attributes
private  String xmlFilePath
          Path of the XML file
 
Constructor Summary
XMLFileWriter()
          Standard constructor all variables are initialized with 0
XMLFileWriter(XMLData xmlFileData)
          Constructor which sets the XMLData Object with the given paramenter and the xmlFilePath is set to 0
XMLFileWriter(XMLData xmlFileData, String xmlFilePath)
          Constructor which setes the XMLData and the xmlFilePath object with the given parameter
 
Method Summary
 XMLData getXmlFileData()
          Returns a XMLData Object which stores all elements and attributes
 String getXmlFilePath()
          Returns the actual Path, where the XML file will be saved
 void saveDataToFile()
          Save the given XMlData object as XMLFile at the given Path
 void setXmlFileData(XMLData xmlFileData)
          Sets the given paramante as the actual XMLData object
 void setXmlFilePath(String xmlFilePath)
          Stets the path for the XML file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlFileData

private XMLData xmlFileData
XMLData Object which stores all elements and attributes


xmlFilePath

private String xmlFilePath
Path of the XML file

Constructor Detail

XMLFileWriter

public XMLFileWriter()
Standard constructor all variables are initialized with 0


XMLFileWriter

public XMLFileWriter(XMLData xmlFileData)
Constructor which sets the XMLData Object with the given paramenter and the xmlFilePath is set to 0

Parameters:
xmlFileData - The XMLData Object which stores all elements and attributes

XMLFileWriter

public XMLFileWriter(XMLData xmlFileData,
                     String xmlFilePath)
Constructor which setes the XMLData and the xmlFilePath object with the given parameter

Parameters:
xmlFileData - The XMLData Object which stores all elements and attributes
xmlFilePath - The path for the XML-File
Method Detail

getXmlFileData

public XMLData getXmlFileData()
Returns a XMLData Object which stores all elements and attributes

Returns:
the list of elements

setXmlFileData

public void setXmlFileData(XMLData xmlFileData)
Sets the given paramante as the actual XMLData object

Parameters:
xmlFileData - A XMlData Object which store all elements and attributes

getXmlFilePath

public String getXmlFilePath()
Returns the actual Path, where the XML file will be saved

Returns:
the actual Path of the XML file

setXmlFilePath

public void setXmlFilePath(String xmlFilePath)
Stets the path for the XML file

Parameters:
xmlFilePath - Path of the XML file

saveDataToFile

public void saveDataToFile()
Save the given XMlData object as XMLFile at the given Path