Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.util
Class DomUtils

    java.lang.Object
      com.bea.p13n.util.DomUtils

    public class DomUtils

extends Object

Field Summary
`static String` | `XML_SCHEMA_INSTANCE_NS_URI`
`static String` | `XMLNS_NS_PREFIX`
`static String` | `XMLNS_NS_URI`

Method Summary
`static List<Element>` | `findAllChildElements(Element parent, String localName)` Finds all child elements matching the local name, while ignoring the namespace URI.
`static List<Element>` | `findAllChildElements(Element parent, String localName, String namespaceURI)` Find all child elements matching the given local name and namespace URI
`static Element` | `findFirstChildElement(Element parent, String localName)` Finds the first child element matching the given local name
`static boolean` | `getBooleanValue(Element element)`
`static boolean` | `getBooleanValue(String textValue)`
`static Element` | `getChildElement(Element parent, String localName)` Recursively find an element with the given local name.
`static Element` | `getFirstChildElement(Element parent, String namespaceUri, String localName)` Find the first child element matching the given namespace URI and local name
`static Element` | `getFirstChildElement(Element parent, String namespaceUri, String localName, boolean createElement)`
`static String` | `getLocalName(String qualifiedName)` Extracts the local qualifiedName from the given qualified qualifiedName
`static QName` | `getQNameContent(Element element)`
`static QName` | `getQNameContent(Element element, String str)`
`static String` | `getTextContent(Element element)` Returns the text content of an element, provided the first child of the element is a Text node.
`static boolean` | `isChildNil(Element parent, String localName)` Checks if the child element is missing or is nil.
`static boolean` | `isJAXBType(Class c)`
`static boolean` | `isJAXBTypeIntance(Object o)`
`static boolean` | `isNil(Element element)` Returns true if the given element is nillable.

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

Field Detail

### XML_SCHEMA_INSTANCE_NS_URI

    public static final String XML_SCHEMA_INSTANCE_NS_URI

See Also
  Constants Summary

### XMLNS_NS_URI

    public static final String XMLNS_NS_URI

See Also
  Constants Summary

### XMLNS_NS_PREFIX

    public static final String XMLNS_NS_PREFIX

See Also
  Constants Summary

Method Detail

### getChildElement

    public static Element getChildElement(Element parent,
                                          String localName)

  Recursively find an element with the given local name. The search excludes the given parent element.

  Parameters
    `parent` - parent
    `localName` - local name of the child
  Returns
    child element

### findFirstChildElement

    public static Element findFirstChildElement(Element parent,
                                                String localName)

  Finds the first child element matching the given local name

  Parameters
    `parent` - parent
    `localName` - local name of the child element
  Returns
    child

### getFirstChildElement

    public static Element getFirstChildElement(Element parent,
                                               String namespaceUri,
                                               String localName)

  Find the first child element matching the given namespace URI and local name

  Parameters
    `parent` - parent element
    `namespaceUri` - namespace URI of the child
    `localName` - local name of the child
  Returns
    child element

### findAllChildElements

    public static List<Element> findAllChildElements(Element parent,
                                                     String localName)

  Finds all child elements matching the local name, while ignoring the namespace URI.

### findAllChildElements

    public static List<Element> findAllChildElements(Element parent,
                                                     String localName,
                                                     String namespaceURI)

  Find all child elements matching the given local name and namespace URI

### isChildNil

    public static boolean isChildNil(Element parent,
                                     String localName)

  Checks if the child element is missing or is nil.

  Parameters
    `parent` - parent
    `localName` - local name of the child
  Returns
    boolean

### isNil

    public static boolean isNil(Element element)

  Returns true if the given element is nillable.

  Parameters
    `element` - element
  Returns
    nillable

### getBooleanValue

    public static boolean getBooleanValue(Element element)

### getBooleanValue

    public static boolean getBooleanValue(String textValue)

### getTextContent

    public static String getTextContent(Element element)

  Returns the text content of an element, provided the first child of the element is a Text node. This method must not be used for elements containing mixed content.

  Parameters
    `element` - element
  Returns
    text

### getLocalName

    public static String getLocalName(String qualifiedName)

  Extracts the local qualifiedName from the given qualified qualifiedName

  Parameters
    `qualifiedName` - qualified name
  Returns
    local name

### getQNameContent

    public static QName getQNameContent(Element element)

### getQNameContent

    public static QName getQNameContent(Element element,
                                        String str)

### getFirstChildElement

    public static Element getFirstChildElement(Element parent,
                                               String namespaceUri,
                                               String localName,
                                               boolean createElement)

### isJAXBTypeIntance

    public static boolean isJAXBTypeIntance(Object o)

### isJAXBType

    public static boolean isJAXBType(Class c)

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

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.