List of usage examples for org.jdom2.input JDOMParseException getLineNumber
public int getLineNumber()
From source file:mx.com.pixup.portal.demo.ValidateXSDXMLCancion.java
public static void main(String[] args) throws IOException, JDOMException { try {//w w w.j av a2 s .c om //Create the XMLReaderJDOMFacotory directly using the schema file instead of 'Schema' String schemaFile = ""; String file = ""; XMLReaderJDOMFactory factory2 = new XMLReaderXSDFactory(schemaFile); SAXBuilder sb2 = new SAXBuilder(factory2); Document doc2 = sb2.build(new File(file)); System.out.println("ok"); System.out.println(doc2.getRootElement().getName()); } catch (org.jdom2.input.JDOMParseException e) { e.getLineNumber(); System.out.println("error"); } }