FTP-Server API

setup
Class XMLParser

java.lang.Object
  |
  +--setup.XMLParser

public class XMLParser
extends Object

A XMLParser, is a structure that can read a XML file into the memory, so it can be used as a setup-file, or something like that.

The root of the structure can be reached through the XMLParsers reference to XMLTag called XML. If the structure is modified at RunTime, it can be saved with the save() method. Comments will stay in the XML file by save().
Notice: There can occur reorganizing of the tags by save, because the XMLParser will rewrite the entire XML-file


Field Summary
 XMLTag XML
          The main tag describes the root of the XML-structure.
 
Constructor Summary
XMLParser(File file)
          Makes an XMLParser, and parses the passed file into its structure.
 
Method Summary
 void save()
          Saves the current XML structure in the XML-File
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML

public final XMLTag XML
The main tag describes the root of the XML-structure. This tag is not shown in the XML-document, but the comments and the option will be shown.

Constructor Detail

XMLParser

public XMLParser(File file)
          throws IOException,
                 NoSuchTagException
Makes an XMLParser, and parses the passed file into its structure.

Parameters:
file - The file for the parser.
Throws:
IOException - Thrown if the file cannot be opened.
NoSuchTagException - Thrown if there is an error in the XML structure in the file.
Method Detail

save

public void save()
          throws IOException
Saves the current XML structure in the XML-File

Throws:
IOException - Thrown if the file cannot be saved!

FTP-Server API