Interface Descriptor

  • public interface Descriptor
    The Descriptor interface defines a mechanism for inspecting a node of an XML based document.

    The idea is to give a programmer the ability to inspect the various tags and attribute values without having to parse the tags. This is useful in that some XML based documents do post-parser processing that can then be handled appropriately by implementations of this interface.

    • Method Detail

      • getAttributeList

        String[] getAttributeList()
        Returns an array of attribute names for the current node.
        Array containing the names of all attributes associated with the node type for this descriptor. If there are no attributes for this descriptor, an empty array is returned.
      • getAttributeValue

        String getAttributeValue(String attr)
        Returns the value of the named attribute.
        String containing the value of the specified attribute. If the named attribute is not valid for this descriptor, null is returned.
      • getChildren

        Enumeration getChildren()
        Returns the Descriptors of the children of this node.
        Descriptors for the children of this Descriptor as an Enumeration. If there are no children, an empty enumeration is returned.
      • getDescriptor

        Descriptor getDescriptor(String qualifiedName)
        Returns the Descriptor for another element contained within the same document.
        Descriptor for another element within the same document given a qualified name (i.e. - "structName1.structName2.dataElementName"). Returns null if there is no element with the specified name.
      • getName

        String getName()
        Returns the simple name of the Descriptor as specified on the name= attribute of its associated tag.
        String containing the simple name of the Descriptor as specified on the name= attribute of its associated tag. If there is no name= attribute, null is returned.
      • getQualifiedName

        String getQualifiedName()
        Returns the qualified name of the Descriptor. This qualified name is the simple name prefixed with the qualified name of this Descriptor's parent and separated with a period (".").
        String containing the qualified name of the Descriptor. If there is no qualified name, null is returned.
      • getTagName

        String getTagName()
        Returns the tag name of the Descriptor.
        String containing the tag name of the element in the Descriptor.
      • hasChildren

        boolean hasChildren()
        Returns true if this Descriptor has childen. Returns false if this Descriptor has no childen.
        Boolean indicating if the Descriptor has children.