aspose file tools*
The moose likes XML and Related Technologies and the fly likes org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element " Watch "org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element " New topic
Author

org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element

Homka Homkaaa
Greenhorn

Joined: Oct 09, 2011
Posts: 2
Hello,

I'm new in JAVA and XML,
I parse my XML againt XSD, and I have this error




Can you help me?

This is my Java code
Actually I dont know if its possible that I have some errors in XML or XSD?

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
Your SAXParseException handler should use the methods provided for showing the location that caused it:

getColumnNumber() and getLineNumber

might as well log the result of getPublicId and getSystemId while you are at it.

The stack trace might help but the useful location will be buried way down the lines.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element