org.jboss.messaging.util
Class XMLUtil
java.lang.Object
org.jboss.messaging.util.XMLUtil
public class XMLUtil
- extends java.lang.Object
- Version:
- $Revision: 3264 $
$Id: XMLUtil.java 3264 2007-10-31 11:42:28Z timfox $
- Author:
- Ovidiu Feodorov
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 java.lang.String |
stripCDATA(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 |
XMLUtil
public XMLUtil()
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)
getTextContent
public 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.
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.
assertEquivalent
public static void assertEquivalent(org.w3c.dom.Node node,
org.w3c.dom.Node node2)
stripCDATA
public static java.lang.String stripCDATA(java.lang.String s)
Copyright © 2006 JBoss Inc. All Rights Reserved.