biz.hammurapi.xml.dom
Class AbstractDomObject

java.lang.Object
  extended by biz.hammurapi.xml.dom.AbstractDomObject
Direct Known Subclasses:
CompositeCommand, ElementContext, Message, SQLCommand

public class AbstractDomObject
extends java.lang.Object

Version:
$Revision: 1.4 $
Author:
Pavel Vlasov

Constructor Summary
AbstractDomObject()
           
 
Method Summary
static org.w3c.dom.Element addElement(org.w3c.dom.Node root, java.lang.String name)
          Adds element with specified name.
static org.w3c.dom.Element addTextElement(org.w3c.dom.Element root, java.lang.String name, java.lang.String text)
          Adds element with text if text is not null.
static java.lang.String getElementText(org.w3c.dom.Element root, java.lang.String child)
           
static java.lang.String getElementText(org.w3c.dom.Node node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDomObject

public AbstractDomObject()
Method Detail

getElementText

public static java.lang.String getElementText(org.w3c.dom.Element root,
                                              java.lang.String child)
                                       throws javax.xml.xpath.XPathExpressionException
Throws:
javax.xml.xpath.XPathExpressionException

getElementText

public static java.lang.String getElementText(org.w3c.dom.Node node)
Parameters:
node -
Returns:
Concatenation of all text sub

addTextElement

public static org.w3c.dom.Element addTextElement(org.w3c.dom.Element root,
                                                 java.lang.String name,
                                                 java.lang.String text)
Adds element with text if text is not null.

Parameters:
root -
name -
text -

addElement

public static org.w3c.dom.Element addElement(org.w3c.dom.Node root,
                                             java.lang.String name)
Adds element with specified name.

Parameters:
root -
name -
Returns:


Copyright © 2003 Hammurapi Group. All Rights Reserved.