umich.cac.util
Class XmlUtil

java.lang.Object
  extended byumich.cac.util.XmlUtil

public class XmlUtil
extends java.lang.Object

XML utilities

Version:
$Header: /cvsroot/pbsaccounting/pbsaccounting/doc/javadoc/umich/cac/util/XmlUtil.html,v 1.6 2003/10/21 20:33:47 rodmach Exp $
Author:
rmach@umich.edu

Field Summary
static java.util.logging.Logger logger
          Logger
 
Constructor Summary
XmlUtil()
           
 
Method Summary
static org.w3c.dom.Document createOutputDOM(org.w3c.dom.Document domSource, java.lang.String xslFileName)
          Create an output DOM from an XSL transform given DOM source and XSLfile.
static void createOutputFile(org.w3c.dom.Document domSource, java.lang.String xslFileName, java.lang.String outputFileName)
          Create a output file from a XSL transform given DOM source and XSLfile
static void createStreamOutputFile(org.w3c.dom.Document domSource, java.lang.String xslFileName, java.lang.String outputFileName)
          Create a output file from a XSL transform given DOM source and XSLfile Used for joblog and other type transforms that don't result in DOM result after transform
static org.w3c.dom.Document parseXmlFile(java.lang.String filename, boolean validating)
          Parses an XML file and returns a DOM document.
static void writeXmlFile(org.w3c.dom.Document doc, java.lang.String filename)
          This method writes a DOM document to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static java.util.logging.Logger logger
Logger

Constructor Detail

XmlUtil

public XmlUtil()
Method Detail

writeXmlFile

public static void writeXmlFile(org.w3c.dom.Document doc,
                                java.lang.String filename)
This method writes a DOM document to a file

Parameters:
doc - DOM to write to file
filename - Name of the file to write

createOutputFile

public static void createOutputFile(org.w3c.dom.Document domSource,
                                    java.lang.String xslFileName,
                                    java.lang.String outputFileName)
Create a output file from a XSL transform given DOM source and XSLfile

Parameters:
domSource - DOM object to write out
xslFileName - name of XSL file to use
outputFileName - name of output file

createOutputDOM

public static org.w3c.dom.Document createOutputDOM(org.w3c.dom.Document domSource,
                                                   java.lang.String xslFileName)
Create an output DOM from an XSL transform given DOM source and XSLfile.

Parameters:
domSource - DOM object to write out
xslFileName - name of XSL file to use
Returns:
DOM output.

createStreamOutputFile

public static void createStreamOutputFile(org.w3c.dom.Document domSource,
                                          java.lang.String xslFileName,
                                          java.lang.String outputFileName)
Create a output file from a XSL transform given DOM source and XSLfile Used for joblog and other type transforms that don't result in DOM result after transform

Parameters:
domSource - DOM object to write out
xslFileName - name of XSL file to use
outputFileName - name of output file

parseXmlFile

public static org.w3c.dom.Document parseXmlFile(java.lang.String filename,
                                                boolean validating)
Parses an XML file and returns a DOM document.

Parameters:
filename - Filename containing XML to parse
validating - true, validate contents against the DTD specified in filename
Returns:
Document representation of XML, or null if couldn't parse