org.ujac.util.xml
Class XmlUtils

java.lang.Object
  extended by org.ujac.util.xml.XmlUtils

public class XmlUtils
extends Object

Name: XmlUtils
Description: Class providing common utility methods for XML parsing issues.

Author:
lauerc

Field Summary
static String DEFAULT_SAX_DRIVER
          The default SAX driver class name.
 
Constructor Summary
XmlUtils()
           
 
Method Summary
static XMLReader createXmlReader(String xmlReaderClass)
          Creates a XMLReader instance according to the given driver class name.
static void disableEntityResolver(XMLReader xmlReader)
          Disables entity resolving for the given XMLReader component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SAX_DRIVER

public static final String DEFAULT_SAX_DRIVER
The default SAX driver class name.

See Also:
Constant Field Values
Constructor Detail

XmlUtils

public XmlUtils()
Method Detail

createXmlReader

public static final XMLReader createXmlReader(String xmlReaderClass)
                                       throws SAXException
Creates a XMLReader instance according to the given driver class name. In case a null value is passed for attribute xmlReaderClass, it first tries to create an instance from system defaults. If this attempt fails, it tries to use the default driver class.

Parameters:
xmlReaderClass - The name of the SAX driver class to use.
Returns:
The created XMLReader instance.
Throws:
SAXException - If no default XMLReader class can be identified and instantiated or the class cannot be loaded, instantiated, and cast to XMLReader.
See Also:
DEFAULT_SAX_DRIVER

disableEntityResolver

public static final void disableEntityResolver(XMLReader xmlReader)
Disables entity resolving for the given XMLReader component. This avoids problems for usage behind a firewall and should increase the performance because of lesser network transfers.

Parameters:
xmlReader - The XMLReader to manipulate


Copyright © 2003-2004 UJAC.org. All Rights Reserved.