File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply 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: 11862
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

Java Resources at www.wbrogden.com
 
 
subject: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element
 
Threads others viewed
Problem while validating XML document with schema using SAX Parser.
How to use DomParser.parse() to parse an XML String instead of the XML location?
SAX XSD Validation. Error callback is called twice.
xml validator problem
Integrating Spring in an existing servlets project
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture