Interface IXmlUnit

All Superinterfaces:
IAddressableUnit, IEventSource, IUnit, IUnitCreator, IUserDataSupport

public interface IXmlUnit extends IAddressableUnit
Units providing XML documents are encouraged to implement this interface.
  • Method Details

    • hasXmlDeclaration

      boolean hasXmlDeclaration()
      Indicate if XML Document has the XML declaration in prolog "<?xml ... ?>"
      Returns:
    • getDocument

      Document getDocument()
      Retrieve the XML document.
      Returns:
    • getItemObject

      Object getItemObject(long id)
      Description copied from interface: IAddressableUnit
      Optionally provide an object associated with the given item. This method may return null, an opaque object, or an object defined by the contract of the implementing object or sub-interface. The SPI of sub-interfaces should specify the item id formats, if any, as well as types and semantics associated with the objects returned by this method.
      Specified by:
      getItemObject in interface IAddressableUnit
      Parameters:
      id - the item id
      Returns:
      if the item id refers to a non-attribute value node, the return value is an org.w3c.dom.Node object; if the item id refers to an attribute value, the return value is a 2-element array containing: the org.w3c.dom.Attr node object; the attribute value as a String object