Package org.zkoss.xml

Class Locators

java.lang.Object
org.zkoss.xml.Locators

public class Locators extends Object
Utilities to handle Locator.
Since:
6.0.0
Author:
tomyeh
  • Constructor Details

    • Locators

      public Locators()
  • Method Details

    • format

      public static String format(String message, Locator loc)
      Formats the message with the location information.
      Parameters:
      loc - the location information. Ignored if null.
    • format

      public static String format(String message, Locator loc)
      Formats the message with the location information.
      Parameters:
      loc - the location information. Ignored if null.
    • format

      public static String format(String message, SourceLocator loc)
      Formats the message with the location information.
      Parameters:
      loc - the location information. Ignored if null.
    • format

      public static String format(String message, String pubId, String sysId, int lineno, int colno)
      Formats the message with the location information.
      Parameters:
      pubId - the public ID (ignored if null)
      sysId - the system ID (ignored if null)
      lineno - the line number (ignored if negative)
      colno - the line number (ignored if negative)
    • toLocation

      public static Location toLocation(Locator loc)
      Converts an instance of Locator to Location. If loc is null, this method returns null.
    • toLocation

      public static Location toLocation(Locator loc)
      Converts an instance of Locator to Location. If loc is null, this method returns null.
    • toLocation

      public static Location toLocation(SourceLocator loc)
      Converts an instance of SourceLocator to Location. If loc is null, this method returns null.