org.jboss.jms.util
Class XMLUtil

java.lang.Object
  extended byorg.jboss.jms.util.XMLUtil

public class XMLUtil
extends java.lang.Object

Version:
$Revision: 1188 $ $Id: XMLUtil.java 1188 2006-08-04 01:25:44Z ovidiu.feodorov@jboss.com $
Author:
Ovidiu Feodorov

Constructor Summary
XMLUtil()
           
 
Method Summary
static void assertEquivalent(org.w3c.dom.Node node, org.w3c.dom.Node node2)
           
static java.lang.String elementToString(org.w3c.dom.Node n)
           
static java.lang.String getTextContent(org.w3c.dom.Node n)
          This metod is here because Node.getTextContent() is not available in JDK 1.4 and I would like to have an uniform access to this functionality.
static org.w3c.dom.Element readerToElement(java.io.Reader r)
           
static org.w3c.dom.Element stringToElement(java.lang.String s)
           
static org.w3c.dom.Element urlToElement(java.net.URL url)
           
 
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

stringToElement

public static org.w3c.dom.Element stringToElement(java.lang.String s)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

urlToElement

public static org.w3c.dom.Element urlToElement(java.net.URL url)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

readerToElement

public static org.w3c.dom.Element readerToElement(java.io.Reader r)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

elementToString

public static java.lang.String elementToString(org.w3c.dom.Node n)
                                        throws XMLException
Throws:
XMLException

getTextContent

public static java.lang.String getTextContent(org.w3c.dom.Node n)
                                       throws XMLException
This metod is here because Node.getTextContent() is not available in JDK 1.4 and I would like to have an uniform access to this functionality. Note: if the content is another element or set of elements, it returns a string representation of the hierarchy. TODO implementation of this method is a hack. Implement it properly.

Throws:
XMLException

assertEquivalent

public static void assertEquivalent(org.w3c.dom.Node node,
                                    org.w3c.dom.Node node2)


Copyright © 2006 JBoss Inc. All Rights Reserved.