Class XMLLocationInformation

java.lang.Object
com.dd.plist.LocationInformation
com.dd.plist.XMLLocationInformation

public class XMLLocationInformation extends LocationInformation
Information about the location of an NSObject within an XML property list file.

Line and column number are only available if the withLineInformation parameter in the call to one of the XMLPropertyListParser's parse methods was set to true. The line information is taken from the Locator class and thus is only an approximation of the actual location that can only be used for diagnostic purposes.

Author:
Daniel Dreibrodt
  • Method Details

    • getXPath

      public String getXPath()
      Gets the XPath of the XML node that is the source for the NSObject.
      Returns:
      The XPath.
    • hasLineInformation

      public boolean hasLineInformation()
      Gets a value indicating whether line and column number are available.
      Returns:
      true, if both line and column number are available; false, otherwise.
    • getLineNumber

      public int getLineNumber()
      Gets the line number of the end of the XML node's start tag, if available.
      Returns:
      The line number (starting at 1), or -1 if the line number is not available.
      See Also:
    • getColumnNumber

      public int getColumnNumber()
      Gets the column number of the end of the XML node's start tag, if available.
      Returns:
      The column (starting at 1), or -1 if the column is not available.
      See Also:
    • getDescription

      public String getDescription()
      Description copied from class: LocationInformation
      Gets a description of the object location.
      Specified by:
      getDescription in class LocationInformation
      Returns:
      The location description.