org.apache.woden

## Interface XMLElement

-     public interface XMLElement

  This interface represents an XML element information item in a format to be interpreted by the Woden implementation. It permits different representations of an element to be used as method arguments or return values without making the Woden API dependent on any particular XML parser or XML object model.
  Author:
    John Kaputin (jkaputin@apache.org)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAttributeValue(String attrName)` Returns the value of the specified attribute or null if it is not found.
    `XMLElement[]` | `getChildElements()` Return an array of the child elements of this element or an empty array if no siblings are found.
    `XMLElement` | `getFirstChildElement()` Return the first child element of this element or null if no children are found.
    `String` | `getLocalName()`
    `URI` | `getNamespaceURI()`
    `XMLElement` | `getNextSiblingElement()` Return the next sibling element of this element or null if no siblings are found.
    `QName` | `getQName()` Return the qualified name of this element.
    `QName` | `getQName(String prefixedValue)` Return the qualified name from the specified prefixed value.
    `Object` | `getSource()` Returns an Object representing an XML element, which the caller must cast to the expected type.
    `void` | `setSource(Object elem)` Accepts an Object representing an XML element.

- - ### Method Detail

    - #### setSource

          void setSource(Object elem)

      Accepts an Object representing an XML element. The implementation should check that it is of a type appropriate for the underlying XML parser or XML Object model being used. For example, a DOM implementation might expect an org.w3c.dom.Element while an AXIOM implementation might expect org.apache.axiom.om.OMElement.
      Parameters:
        `elem` - the Object representing the XML element
      Throws:
        `IllegalArgumentException` - if elem is not a type supported by the implementation.

    - #### getSource

          Object getSource()

      Returns an Object representing an XML element, which the caller must cast to the expected type. For example, for DOM implementation we might cast it to an org.w3c.dom.Element whereas an AXIOM implementation might cast it to an org.apache.axiom.om.OMElement.
      Returns:
        an Object representing the XML element

    - #### getAttributeValue

          String getAttributeValue(String attrName)

      Returns the value of the specified attribute or null if it is not found.
      Parameters:
        `attrName` - name of attribute to look for
      Returns:
        the attribute value including prefix if present

    - #### getNamespaceURI

          URI getNamespaceURI()
                              throws WSDLException

      Returns:
        the namespace URI of the element or null if it has no namespace
      Throws:
        `WSDLException`

    - #### getLocalName

          String getLocalName()

      Returns:
        the local name of the element

    - #### getQName

          QName getQName()

      Return the qualified name of this element.
      Returns:
        QName this element's qualified name.

    - #### getQName

          QName getQName(String prefixedValue)
                         throws WSDLException

      Return the qualified name from the specified prefixed value.
      Parameters:
        `prefixedValue` - of the form [namespace prefix]:[local name]
      Returns:
        the QName corresponding to the prefix
      Throws:
        `WSDLException`

    - #### getFirstChildElement

          XMLElement getFirstChildElement()

      Return the first child element of this element or null if no children are found.
      Returns:
        the first child element.

    - #### getNextSiblingElement

          XMLElement getNextSiblingElement()

      Return the next sibling element of this element or null if no siblings are found.
      Returns:
        the next sibling element.

    - #### getChildElements

          XMLElement[] getChildElements()

      Return an array of the child elements of this element or an empty array if no siblings are found.
      Returns:
        an XMLElement array containing the child elements.

Copyright ? Apache Software Foundation. All Rights Reserved.