Open marekweb opened 6 years ago
Currently when there's a parser error, the location of the error is appended as a string to the error message.
Error: Unexpected close tag Line: 0 Column: 17 Char: >
It would be useful to provide the location as a set of properties on the object.
{ line: 0, column: 17, char: '>' }
Use cases:
Better error reporting. Allow the possibility of excerpting the XML input to show the location of the error.
parser.onerror = function(error) { console.error('Parsing error at location: ' + error.line + ':' + error.column) }
Currently when there's a parser error, the location of the error is appended as a string to the error message.
It would be useful to provide the location as a set of properties on the object.
Use cases:
Better error reporting. Allow the possibility of excerpting the XML input to show the location of the error.