One thing I can suggest is double-check that you are indeed using the V2 version, using:
"scomp -version" V2.0 supports line numbers by default, while V2.1 also has column numbers on by default Radu -----Original Message----- From: Quynh-Anh Nguyen [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 5:18 AM To: user@xmlbeans.apache.org Subject: XmlError.getLine() always returns -1 even withXmlOptions.setLoadLineNumbers() set Hello, I can't seem to get the line number that is associated with the XmlError that I do get when I validate. Does anybody knows what is wrong, or is this feature not supported. I have also searched the Internet and hunt up on this subject, but I just can't get it to work. I also follow the thread regarding the Piccolo subject for line number as well, but I am using 2.1.0, which should have this feature. Any help is greatly appreciated. I am using XmlBeans 2.1.0 with WebLogic 8.1, jdk142_03. ArrayList validationErrors = new ArrayList(); XmlOptions validationOptions = new XmlOptions(); validationOptions.setLoadLineNumbers(XmlOptions.LOAD_LINE_NUMBERS_END_EL EMENT); validationOptions.setErrorListener(validationErrors); PS81Document ps81Doc; try { ps81Doc = PS81Document.Factory.parse(inputXMLStream); PS81Document.PS81 test = ps81Doc.getPS81(); IdentifyingRecord81 header = test.getHeader(); boolean isValid = header.validate(validationOptions); if (!isValid) { Iterator iter = validationErrors.iterator(); while (iter.hasNext()) { XmlError xmlError = (XmlError) iter.next(); int line = xmlError.getLine(); . . . } . . . --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]