Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.arranger.jarl.util
Class XMLUtil  view XMLUtil download XMLUtil.java

java.lang.Object
  extended bycom.arranger.jarl.util.XMLUtil

public class XMLUtil
extends java.lang.Object

XMLUtil created on Jan 18, 2003


Nested Class Summary
protected static class XMLUtil.CustomEntityResolver
           
protected static class XMLUtil.CustomErrorHandler
           
 
Field Summary
static java.lang.String JAXP_SCHEMA_LANGUAGE
           
protected static javax.xml.parsers.DocumentBuilderFactory s_docBuilderFactory
           
protected static boolean s_useValidation
           
static java.lang.String W3C_XML_SCHEMA
           
 
Constructor Summary
XMLUtil()
           
 
Method Summary
protected static org.w3c.dom.Document _loadDocument(org.xml.sax.InputSource inputSource)
           
static javax.xml.parsers.DocumentBuilderFactory getBuilderFactory()
           
static javax.xml.parsers.DocumentBuilderFactory getDocBuilderFactory()
           
static java.lang.String getNodeText(org.w3c.dom.Node node)
          Get the text value for the given node.
private static org.apache.xml.serialize.XMLSerializer getXMLSerializer(java.io.Writer out, boolean minimizeXMLSize)
           
static boolean isUseValidation()
           
static org.w3c.dom.Document loadDocument(java.io.InputStream inputStream)
           
static org.w3c.dom.Document loadDocument(java.io.Reader reader)
           
static org.w3c.dom.Document loadDocument(java.lang.String location)
           
static org.w3c.dom.Document loadDocument(java.lang.String location, boolean doInclude)
           
static org.w3c.dom.Document loadDocumentFromXML(java.lang.String xml)
           
static org.w3c.dom.Document newDocument()
           
static javax.xml.parsers.DocumentBuilder newDocumentBuilder()
          Creates and returns document builder
static java.lang.String preprocesXML(java.io.File file, java.util.Stack stack)
           
protected static java.lang.String replaceText(java.lang.String includeDirective, java.util.Stack stack)
           
static org.w3c.dom.Element selectElement(org.w3c.dom.Node node, java.lang.String xpath)
          returns a node from the suplied node that meets the xpath criteria.
static org.w3c.dom.traversal.NodeIterator selectNodeIterator(org.w3c.dom.Node node, java.lang.String xpath)
          returns a node iterator from the suplied node that meets the xpath criteria.
static org.w3c.dom.NodeList selectNodeList(org.w3c.dom.Node node, java.lang.String xpath)
          returns a node list from the suplied node that meets the xpath criteria.
static org.w3c.dom.Node selectSingleNode(org.w3c.dom.Node node, java.lang.String xpath)
          returns a node from the suplied node that meets the xpath criteria.
static void setDocBuilderFactory(javax.xml.parsers.DocumentBuilderFactory docBuilderFactory)
           
static void setUseValidation(boolean useValidation)
           
static java.lang.String toString(org.w3c.dom.Node node)
          Serializes document node and returns its content as a string
static java.lang.String toString(org.w3c.dom.Node node, boolean minimizeXMLSize)
          Serializes document node and returns its content as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAXP_SCHEMA_LANGUAGE

public static final java.lang.String JAXP_SCHEMA_LANGUAGE
See Also:
Constant Field Values

W3C_XML_SCHEMA

public static final java.lang.String W3C_XML_SCHEMA
See Also:
Constant Field Values

s_docBuilderFactory

protected static javax.xml.parsers.DocumentBuilderFactory s_docBuilderFactory

s_useValidation

protected static boolean s_useValidation
Constructor Detail

XMLUtil

public XMLUtil()
Method Detail

getDocBuilderFactory

public static javax.xml.parsers.DocumentBuilderFactory getDocBuilderFactory()

setDocBuilderFactory

public static void setDocBuilderFactory(javax.xml.parsers.DocumentBuilderFactory docBuilderFactory)

isUseValidation

public static boolean isUseValidation()

setUseValidation

public static void setUseValidation(boolean useValidation)

loadDocument

public static org.w3c.dom.Document loadDocument(java.lang.String location)
                                         throws java.lang.Exception

loadDocument

public static org.w3c.dom.Document loadDocument(java.lang.String location,
                                                boolean doInclude)
                                         throws java.lang.Exception

selectSingleNode

public static org.w3c.dom.Node selectSingleNode(org.w3c.dom.Node node,
                                                java.lang.String xpath)
returns a node from the suplied node that meets the xpath criteria.


selectElement

public static org.w3c.dom.Element selectElement(org.w3c.dom.Node node,
                                                java.lang.String xpath)
returns a node from the suplied node that meets the xpath criteria.


selectNodeList

public static org.w3c.dom.NodeList selectNodeList(org.w3c.dom.Node node,
                                                  java.lang.String xpath)
returns a node list from the suplied node that meets the xpath criteria.


selectNodeIterator

public static org.w3c.dom.traversal.NodeIterator selectNodeIterator(org.w3c.dom.Node node,
                                                                    java.lang.String xpath)
returns a node iterator from the suplied node that meets the xpath criteria.


loadDocument

public static org.w3c.dom.Document loadDocument(java.io.InputStream inputStream)
                                         throws java.lang.Exception

loadDocument

public static org.w3c.dom.Document loadDocument(java.io.Reader reader)
                                         throws java.lang.Exception

loadDocumentFromXML

public static org.w3c.dom.Document loadDocumentFromXML(java.lang.String xml)
                                                throws java.lang.Exception

newDocument

public static org.w3c.dom.Document newDocument()

newDocumentBuilder

public static javax.xml.parsers.DocumentBuilder newDocumentBuilder()
Creates and returns document builder


getBuilderFactory

public static javax.xml.parsers.DocumentBuilderFactory getBuilderFactory()
                                                                  throws java.lang.Exception

getNodeText

public static java.lang.String getNodeText(org.w3c.dom.Node node)
Get the text value for the given node.


_loadDocument

protected static org.w3c.dom.Document _loadDocument(org.xml.sax.InputSource inputSource)
                                             throws java.lang.Exception

toString

public static java.lang.String toString(org.w3c.dom.Node node)
Serializes document node and returns its content as a string


toString

public static java.lang.String toString(org.w3c.dom.Node node,
                                        boolean minimizeXMLSize)
Serializes document node and returns its content as a string


getXMLSerializer

private static org.apache.xml.serialize.XMLSerializer getXMLSerializer(java.io.Writer out,
                                                                       boolean minimizeXMLSize)

preprocesXML

public static java.lang.String preprocesXML(java.io.File file,
                                            java.util.Stack stack)
                                     throws java.lang.Exception

replaceText

protected static java.lang.String replaceText(java.lang.String includeDirective,
                                              java.util.Stack stack)
                                       throws java.lang.Exception