Class LocatedElement

    • Constructor Detail

      • LocatedElement

        public LocatedElement​(String name,
                              Namespace namespace)
        Creates a new element with the supplied (local) name and namespace. If the provided namespace is null, the element will have no namespace.
        Parameters:
        name - local name of the element
        namespace - namespace for the element
        Throws:
        IllegalNameException - if the given name is illegal as an element name
      • LocatedElement

        public LocatedElement​(String name)
        Create a new element with the supplied (local) name and no namespace.
        Parameters:
        name - local name of the element
        Throws:
        IllegalNameException - if the given name is illegal as an element name.
      • LocatedElement

        public LocatedElement​(String name,
                              String uri)
        Creates a new element with the supplied (local) name and a namespace given by a URI. The element will be put into the unprefixed (default) namespace.
        Parameters:
        name - name of the element
        uri - namespace URI for the element
        Throws:
        IllegalNameException - if the given name is illegal as an element name or the given URI is illegal as a namespace URI
      • LocatedElement

        public LocatedElement​(String name,
                              String prefix,
                              String uri)
        Creates a new element with the supplied (local) name and a namespace given by the supplied prefix and URI combination.
        Parameters:
        name - local name of the element
        prefix - namespace prefix
        uri - namespace URI for the element
        Throws:
        IllegalNameException - if the given name is illegal as an element name, the given prefix is illegal as a namespace prefix, or the given URI is illegal as a namespace URI
    • 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