[xmljs-users] Q: catching a DOMException, retrieving line and column
Brought to you by:
djoham,
witchhunter
From: Simon O. <sim...@we...> - 2007-10-09 14:55:29
|
Hi all, I'm using the DOMImplementation of XML for <SCRIPT> to parse user-written xml. So syntax errors are likely. My code is: var parser = new DOMImplementation(); try { var domDoc = parser.loadXML(sXml); } catch (e) { var sCode = parser.translateErrCode(e.code); } How do I retrieve the line and the column where the error occurred? The XMLP-parser provides getLineNumber and getColumnNumber, but the parser-object used in xmlw3cdom.js (line 177) cannot be accessed from outside. Excuse my english, please ;) Greetings Simon |