com.beasys.commerce.util
Class DOMHelper

java.lang.Object
  extended by com.beasys.commerce.util.DOMHelper

Deprecated Use DomHelper

@Deprecated
public class DOMHelper
extends Object


Constructor Summary
DOMHelper()
          Deprecated See BEA Commerce product offering
 
Method Summary
static String extractAttributeValue(Node node, String attribute)
          Deprecated See BEA Commerce product offering
static Node extractNodeByTag(Node node, String tag)
          Deprecated See BEA Commerce product offering
static NodeList extractNodeListByTag(Node node, String tag)
          Deprecated See BEA Commerce product offering
static String extractNodeValue(Node node)
          Deprecated See BEA Commerce product offering
static String getTagName(Element e)
          Deprecated See BEA Commerce product offering
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMHelper

public DOMHelper()
Deprecated See BEA Commerce product offering

Method Detail

extractNodeByTag

public static Node extractNodeByTag(Node node,
                                    String tag)
                             throws ApplicationException
Deprecated See BEA Commerce product offering

Returns a node matching a given tag. Returned node is a child of a given node. Returns null if no node has been found, or if the given node is null. Throws an exception if a given node has more than one child node with a given tag.

Parameters
node - xml node from DOM model
tag - specifies the name of the node to look for in the DOM model
Throws
ApplicationException

extractNodeListByTag

public static NodeList extractNodeListByTag(Node node,
                                            String tag)
                                     throws ApplicationException
Deprecated See BEA Commerce product offering

/** Returns a nodeList consisting of nodes that match a given tag and that are descendant elements of a given node. Elements might not be node's direct children, but few levels deep. Returns null if no subelements have been found, or if the given node is null

Parameters
node - xml node from DOM model
tag - specifies the name of the node to look for in the DOM model
Throws
ApplicationException

extractNodeValue

public static String extractNodeValue(Node node)
                               throws ApplicationException
Deprecated See BEA Commerce product offering

Finds node value as string object Return null if node is not present or the node does not have a value

Parameters
node - xml node from DOM model
Throws
ApplicationException

extractAttributeValue

public static String extractAttributeValue(Node node,
                                           String attribute)
                                    throws ApplicationException
Deprecated See BEA Commerce product offering

Finds value for an attribute with a given name. Attribute belongs to a given node. Only nodes that are elements will have attributes. Returns null if the given node is null or attribute does not exist Throws exception if given node is not an element.

Parameters
node - xml node from DOM model
attribute - the name of the attribute
Throws
ApplicationException

getTagName

public static String getTagName(Element e)
Deprecated See BEA Commerce product offering

Get the non-namespace-prefixed tag name of an element.



Copyright © 2008 BEA Systems, Inc. All Rights Reserved