Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unexpected element 'UUID'...expected element 'UUID' ???

 
Bob Peterson
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to validate an XML doc against a schema and am getting this strange error. This is the actual error from the parser :

cvc-complex-type.2.4.a: Invalid content was found starting with element 'UUID'. One of '{UUID}' is expected

the <UUID> element is the first element in a complex type, the complex type is a sequence. The complex typed element is also the root element of the document. So is this basically saying there is a problem with the root element?

Besides the sequence, the root element only has a simple attribute required, and that attribute is in the instance document that I'm trying to validate. The root element also contains all the various 'xmlns="..", xmlns:xsi="...", and xsi:schemaLocation=" " required for schema validation.

Any ideas? I'm no Schema expert, but I've done a little work on it.

XML instance :



Schema snippet :



[ January 02, 2007: Message edited by: B Preston ]
[ January 02, 2007: Message edited by: B Preston ]
 
Paul Clapham
Sheriff
Pie
Posts: 20955
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The element in the XML document is a UUID element in the "http://covver.lmig.com/covver/xsd/request" namespace, but the schema is calling for a UUID element in the "http://covver.company.com/covver/xsd/request" namespace, no? At least that's how I read it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic