Class LocatedProcessingInstruction

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Located, NamespaceAware

    public class LocatedProcessingInstruction
    extends ProcessingInstruction
    implements Located
    An XML processing instruction. Methods allow the user to obtain the target of the PI as well as its data. The data can always be accessed as a String or, if the data appears akin to an attribute list, can be retrieved as name/value pairs.
    Author:
    Rolf Lear
    See Also:
    Serialized Form
    • Constructor Detail

      • LocatedProcessingInstruction

        public LocatedProcessingInstruction​(java.lang.String target)
        This will create a new ProcessingInstruction with the specified target.
        Parameters:
        target - String target of PI.
        Throws:
        IllegalTargetException - if the given target is illegal as a processing instruction name.
      • LocatedProcessingInstruction

        public LocatedProcessingInstruction​(java.lang.String target,
                                            java.util.Map<java.lang.String,​java.lang.String> data)
        This will create a new ProcessingInstruction with the specified target and data.
        Parameters:
        target - String target of PI.
        data - Map data for PI, in name/value pairs
        Throws:
        IllegalTargetException - if the given target is illegal as a processing instruction name.
      • LocatedProcessingInstruction

        public LocatedProcessingInstruction​(java.lang.String target,
                                            java.lang.String data)
        This will create a new ProcessingInstruction with the specified target and data.
        Parameters:
        target - String target of PI.
        data - String data for PI.
        Throws:
        IllegalTargetException - if the given target is illegal as a processing instruction name.
    • Method Detail

      • getLine

        public int getLine()
        Description copied from interface: Located
        Get the line number
        Specified by:
        getLine in interface Located
        Returns:
        the line number
      • getColumn

        public int getColumn()
        Description copied from interface: Located
        Get the column (character on the line).
        Specified by:
        getColumn in interface Located
        Returns:
        the column
      • setLine

        public void setLine​(int line)
        Description copied from interface: Located
        Set the line number
        Specified by:
        setLine in interface Located
        Parameters:
        line - the line.
      • setColumn

        public void setColumn​(int col)
        Description copied from interface: Located
        Set the column (character on the line).
        Specified by:
        setColumn in interface Located
        Parameters:
        col - The column