Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.servingxml.util.xml
Class DomHelper

    java.lang.Object
      com.servingxml.util.xml.DomHelper

    public class DomHelper

extends java.lang.Object

Contains static helper methods for querying a DOM object.

Field Summary
`static java.lang.String` | `XMLNS`
`static java.lang.String` | `XMLNS_NS_URI`

Method Summary
`static boolean` | `areEqual(org.w3c.dom.Element element, java.lang.String namespaceUri2, java.lang.String localName2)`
`static boolean` | `areEqual(java.lang.String namespaceUri1, java.lang.String localName1, java.lang.String namespaceUri2, java.lang.String localName2)`
`static boolean` | `containsChildElement(org.w3c.dom.Element sectionNode, java.lang.String namespaceUri, java.lang.String localName)` Returns true if the specified element contains a child element with the specified namespaceUri and localName, false otherwise.
`static java.util.Iterator` | `createChildElementIterator(org.w3c.dom.Node sectionNode)` Returns an iterator over all child elements of the given node.
`static java.util.Iterator` | `createChildElementIterator(org.w3c.dom.Node sectionNode, java.lang.String namespaceUri)` Returns an iterator over all child elements of the given node that have the the specified namespaceUri.
`static java.util.Iterator` | `createChildElementIterator(org.w3c.dom.Node sectionNode, java.lang.String namespaceUri, java.lang.String localName)` Returns an iterator over all child elements of the given node that have the the specified namespaceUri and localName.
`static Name` | `createName(java.lang.String qname, org.w3c.dom.Element element)`
`static PrefixMap` | `createPrefixMap(org.w3c.dom.Element element)`
`static PrefixMap` | `createPrefixMap(org.w3c.dom.Element element, PrefixMap parent)`
`static java.lang.String` | `escapeMarkup(org.w3c.dom.Element parent)`
`static java.lang.String` | `getAttribute(java.lang.String qname, org.w3c.dom.Element element)`
`static org.w3c.dom.Element` | `getFirstChildElement(org.w3c.dom.Node node)` Returns the first child element of the given node, null if there are none.
`static org.w3c.dom.Element` | `getFirstChildElement(org.w3c.dom.Node node, java.lang.String namespaceUri, java.lang.String localName)` Returns the first child element of the given node that has the specified namespaceUri and localName, null if there are none.
`static java.lang.String` | `getInnerText(org.w3c.dom.Element element)` Returns the text value of an element node.
`static java.lang.String` | `getNamespaceUri(java.lang.String prefix, org.w3c.dom.Element element)`
`static java.lang.String` | `getPrefix(java.lang.String qname)`
`static java.lang.String` | `getScopedAttribute(java.lang.String qname, org.w3c.dom.Element element)`
`static java.lang.String` | `getValue(org.w3c.dom.Element element)` Returns the text value of an element node.
`static java.lang.String` | `preserveMarkup(org.w3c.dom.Element parent)`

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

Field Detail

### XMLNS_NS_URI

    public static java.lang.String XMLNS_NS_URI

### XMLNS

    public static final java.lang.String XMLNS

See Also:
  Constant Field Values

Method Detail

### getFirstChildElement

    public static final org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node)

  Returns the first child element of the given node, null if there are none.

### getFirstChildElement

    public static final org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node node,
                                                                 java.lang.String namespaceUri,
                                                                 java.lang.String localName)

  Returns the first child element of the given node that has the specified namespaceUri and localName, null if there are none.

### containsChildElement

    public static final boolean containsChildElement(org.w3c.dom.Element sectionNode,
                                                     java.lang.String namespaceUri,
                                                     java.lang.String localName)

  Returns true if the specified element contains a child element with the specified namespaceUri and localName, false otherwise.

### createChildElementIterator

    public static final java.util.Iterator createChildElementIterator(org.w3c.dom.Node sectionNode,
                                                                      java.lang.String namespaceUri)

  Returns an iterator over all child elements of the given node that have the the specified namespaceUri.

### createChildElementIterator

    public static final java.util.Iterator createChildElementIterator(org.w3c.dom.Node sectionNode,
                                                                      java.lang.String namespaceUri,
                                                                      java.lang.String localName)

  Returns an iterator over all child elements of the given node that have the the specified namespaceUri and localName.

### createChildElementIterator

    public static java.util.Iterator createChildElementIterator(org.w3c.dom.Node sectionNode)

  Returns an iterator over all child elements of the given node.

### getInnerText

    public static java.lang.String getInnerText(org.w3c.dom.Element element)

  Returns the text value of an element node.

### getValue

    public static java.lang.String getValue(org.w3c.dom.Element element)

  Returns the text value of an element node.

### areEqual

    public static final boolean areEqual(org.w3c.dom.Element element,
                                         java.lang.String namespaceUri2,
                                         java.lang.String localName2)

### areEqual

    public static final boolean areEqual(java.lang.String namespaceUri1,
                                         java.lang.String localName1,
                                         java.lang.String namespaceUri2,
                                         java.lang.String localName2)

### getPrefix

    public static java.lang.String getPrefix(java.lang.String qname)

### createName

    public static Name createName(java.lang.String qname,
                                  org.w3c.dom.Element element)

### getNamespaceUri

    public static java.lang.String getNamespaceUri(java.lang.String prefix,
                                                   org.w3c.dom.Element element)

### createPrefixMap

    public static PrefixMap createPrefixMap(org.w3c.dom.Element element)

### createPrefixMap

    public static PrefixMap createPrefixMap(org.w3c.dom.Element element,
                                            PrefixMap parent)

### getScopedAttribute

    public static final java.lang.String getScopedAttribute(java.lang.String qname,
                                                            org.w3c.dom.Element element)

### getAttribute

    public static final java.lang.String getAttribute(java.lang.String qname,
                                                      org.w3c.dom.Element element)

### escapeMarkup

    public static java.lang.String escapeMarkup(org.w3c.dom.Element parent)

### preserveMarkup

    public static java.lang.String preserveMarkup(org.w3c.dom.Element parent)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD