Interface ParseResult

All Known Subinterfaces:
ValidationResult

public interface ParseResult
An interface defining the properties of XML document parsing results. A ParseResult comprises various high level properties of the parsed XML document, such as the root element name, namespace, etc.
  • Method Details

    • isWellFormed

      boolean isWellFormed()
      Is the XML document well formed?
      Returns:
      true if the result is for a well formed XML document, otherwise false
    • getRootNamespace

      Namespace getRootNamespace()
      Get the Namespace associated with the document's root element
      Returns:
      the Namespace of the document's root element
    • getNamespaces

      List<Namespace> getNamespaces()
      Get all of the declared Namespaces in the document
      Returns:
      the List of the document's namespaces
    • getRootPrefix

      String getRootPrefix()
      Get the root element namespace prefix
      Returns:
      The String namesapce prefix of the document's root element, or an empty String if there is no root element NS prefix
    • getRootName

      String getRootName()
      Get the unqualified name of the document's root element
      Returns:
      The String unqualified name of the document's root element, or an empty String if there is no root element name
    • isRootName

      boolean isRootName(String name)
      Establish whether the document's root element name matches the supplied name
      Parameters:
      name - the String name to compare with the document's root element name
      Returns:
      true if the document's root element name matches the supplied name, otherwise false
    • getRootAttributes

      List<Attribute> getRootAttributes()
      Get the root element Attributes
      Returns:
      the List root element Attributes
    • getRootAttributeValue

      String getRootAttributeValue(String qName)
      Get the value of the root element attribute with the supplied qualified name.
      Parameters:
      qName - the String qualified name of the Attribute that the value is required of.
      Returns:
      the value of the Attribute, or null if the Attribute does not exist
    • getMessages

      List<Message> getMessages()
      The List of Message instances generated when parsing the document, which may be empty
      Returns:
      the List of document parsing messages