Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public class XMLParseException
- Object
- Throwable
- Exception
- RuntimeException
- IllegalArgumentException
- XMLParseException
Thrown by an XMLParser refusing malformed input (see
XMLParser.setRejectMalformed(boolean))
when the document is not well formed, nests deeper than
XMLParser.setMaxDepth(int), or references an entity the parser does not
define.
It extends IllegalArgumentException, which is what the parser has always
thrown when a ParserCallback asks it to stop, so code that catches that
keeps working.
Constructors
public XMLParseException(String message) | Creates an exception with no position. |
public XMLParseException(String message, int line, int column) | Creates an exception at a position, which the message names as “line 3, column 7: …”. |
Methods
public int getLine() | The line of the error, from 1, or -1 when it has no position. |
public int getColumn() | The column of the error, from 1, or -1 when it has no position. |
Inherited methods
Constructor details
XMLParseException
public XMLParseException(String message)Creates an exception with no position.
Parameters
messageString- what is wrong
XMLParseException
public XMLParseException(String message, int line, int column)Creates an exception at a position, which the message names as
“line 3, column 7: …”.
Parameters
messageString- what is wrong
lineint- the line of the offending character, from 1
columnint- its column, from 1 (0 before the first character of a line)
Method details
getLine
public int getLine()The line of the error, from 1, or -1 when it has no position.
Returns
the line
getColumn
public int getColumn()The column of the error, from 1, or -1 when it has no position.
Returns
the column