org.enhydra.xml
Class XMLDocumentFactory

java.lang.Object
  extended byorg.enhydra.xml.XMLDocumentFactory

public class XMLDocumentFactory
extends java.lang.Object

Version:
1.0
Author:
Tweety A class for manipulating the entire xml file (reading, writing...).

Constructor Summary
XMLDocumentFactory()
          Constructs an empty XMLDocumentFactory
XMLDocumentFactory(java.lang.String fileName)
          Constructs a XMLDocumentFactory with the given
 
Method Summary
 java.lang.String getFileName()
          Returns xml file name.
 org.w3c.dom.Document parse()
          Parses xml file and creates creates Document.
static org.w3c.dom.Document parse(java.lang.String fileName)
          Parses xml file with the given name and creates Document.
 void serialize(org.w3c.dom.Node node)
          Serializes node with all subnodes to the xml file with the default Properties of the xml declaration.
static void serialize(org.w3c.dom.Node node, java.lang.String fileName, java.util.Properties prop)
          Serializes node with all subnodes to the xml file with the given name, and with the Properties of the xml declaration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDocumentFactory

public XMLDocumentFactory()
Constructs an empty XMLDocumentFactory


XMLDocumentFactory

public XMLDocumentFactory(java.lang.String fileName)
Constructs a XMLDocumentFactory with the given

Parameters:
fileName - as String
Method Detail

getFileName

public java.lang.String getFileName()
Returns xml file name.

Returns:
xml file name.

parse

public static org.w3c.dom.Document parse(java.lang.String fileName)
Parses xml file with the given name and creates Document.

Parameters:
fileName - xml file name.
Returns:
document.

parse

public org.w3c.dom.Document parse()
Parses xml file and creates creates Document.

Returns:
object of document

serialize

public static void serialize(org.w3c.dom.Node node,
                             java.lang.String fileName,
                             java.util.Properties prop)
Serializes node with all subnodes to the xml file with the given name, and with the Properties of the xml declaration.

Parameters:
node - root node of the document.
fileName - xml file name
prop - Properties of the xml declaration.

serialize

public void serialize(org.w3c.dom.Node node)
Serializes node with all subnodes to the xml file with the default Properties of the xml declaration.

Parameters:
node - root node of the document.


Copyright © 2002-2007 Together - the Workgroup. All Rights Reserved.