Meaningless Drivel is fun!
The moose likes XML and Related Technologies and the fly likes XML Schema error 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 "XML Schema error " Watch "XML Schema error " New topic

XML Schema error

Martin Hat

Joined: Sep 23, 2013
Posts: 1
I am trying to send XMl data but keep getting the error shown below

docType to application/pdf
<Text>XML failed schema validation: Invalid XML: Datatype error: Type:InvalidDatatypeValueException, Message:Value 'application/pdf' is not in enumeration . line 251 column 47</Text>

From what is shown above I dont know if anyone can help.

Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

Hi Martin, welcome to the Ranch!

From what I can see there, here's what's going on.

Something is editing an XML document and it's using an XML schema to do that. Now, we can't see any of those three things in your post but we can see the result: the schema says that in Line 251 of the document, you've used "application/pdf" as the value of something and you aren't allowed to do that. It looks like the schema contains an approved list of what you can put in that location, and "application/pdf" isn't in that list.

So, you should have a look at the XML document and fix it. Or maybe somebody else created the document and ran it through your application? If that's the case then you would have to send the document back and get them to fix it. Anyway if that doesn't help, maybe you could tell us some more about the background for this question?
I agree. Here's the link:
subject: XML Schema error
jQuery in Action, 3rd edition