org.objectweb.jonas.webapp.jonasadmin.xml
Class XMLUtil

java.lang.Object
  extended by org.objectweb.jonas.webapp.jonasadmin.xml.XMLUtil

public class XMLUtil
extends java.lang.Object

A class which provides various utilities to interact with XML files.

Author:
Greg Lapouchnian, Patrick Smith

Constructor Summary
XMLUtil()
           
 
Method Summary
static org.w3c.dom.Document extractXML(java.lang.String file)
          Returns a new Document from the XML file given from the file.
static org.w3c.dom.Document extractXML(java.lang.String archiveName, java.lang.String xmlFilePath)
          Extract a DOM Document from an XML file located within an archive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLUtil

public XMLUtil()
Method Detail

extractXML

public static org.w3c.dom.Document extractXML(java.lang.String archiveName,
                                              java.lang.String xmlFilePath)
                                       throws java.lang.Exception
Extract a DOM Document from an XML file located within an archive.

Parameters:
archiveName - the path to the archive to extract from
xmlFilePath - the path within the archive to extract.
Returns:
a Document representation of the XML file.
Throws:
java.lang.Exception - if the document does not parse properly.

extractXML

public static org.w3c.dom.Document extractXML(java.lang.String file)
Returns a new Document from the XML file given from the file.

Parameters:
file - the path to the XML file.
Returns:
a Document representation of the file.