Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


oracle.rules.sdk.store.util
Class XMLUtil

java.lang.Object
  extended byoracle.rules.sdk.store.util.XMLUtil


public class XMLUtil
extends java.lang.Object

XML utility methods.


Constructor Summary
XMLUtil()
           

 

Method Summary
static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
          Gets a document builder.
static org.w3c.dom.Document parseXML(java.io.InputStream is)
          Parse an XML document given an InputStream
static org.w3c.dom.Document parseXML(java.io.Reader r)
          Parse an XML document given a Reader
static void toXML(org.w3c.dom.Node node, java.io.OutputStreamWriter osw)
          Writes the DOM tree as XML text to the specified output stream.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

XMLUtil

public XMLUtil()

Method Detail

getDocumentBuilder

public static javax.xml.parsers.DocumentBuilder getDocumentBuilder()
                                                            throws DocumentException
Gets a document builder.
Returns:
a document builder.
Throws:
DocumentException - if an error is encountered.

parseXML

public static org.w3c.dom.Document parseXML(java.io.Reader r)
                                     throws DocumentException
Parse an XML document given a Reader
Parameters:
r - the Reader.
Returns:
the parsed document.
Throws:
DocumentException - if an error is encountered.

parseXML

public static org.w3c.dom.Document parseXML(java.io.InputStream is)
                                     throws DocumentException
Parse an XML document given an InputStream
Parameters:
is - the input stream from which to read the XML.
Returns:
the parsed document.
Throws:
DocumentException - if an error is encountered.

toXML

public static void toXML(org.w3c.dom.Node node,
                         java.io.OutputStreamWriter osw)
                  throws DocumentException
Writes the DOM tree as XML text to the specified output stream. The output is UTF-8 encoded.
Parameters:
node - the DOM tree.
osw - the OutputStreamWriter the XML will be written to.
Throws:
DocumentException - if an error is encountered.

Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


Copyright © 2006, Oracle. All rights reserved.