wood burning stoves 2.0*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes XML schema validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "XML schema validation" Watch "XML schema validation" New topic
Author

XML schema validation

Arundhathi Menon
Ranch Hand

Joined: Jan 14, 2004
Posts: 113
Hello,

I am validating an XML document using an XML schema. I am getting the followng error

cvc-complex-type.2.4.a: Invalid content was found starting with element 'orgName'. One of '{"":building}' is expected.
Would be glad if someone could help. Thank you in advance



This is my XML doc


Schema used to validate it:



SCJP , SCWCD , SCBCD , SCDJWS
akkineni sreekanth
Greenhorn

Joined: Jun 08, 2009
Posts: 6
sorry
i cant help you
but i sugest to send this request to tosanthoshk@yahoo.com you will get answer
Sachet Varma
Ranch Hand

Joined: Jun 07, 2009
Posts: 39
Hello Arundhathi,

Whenever you extend a type , you need to maintain the same order of element definition in your xml as well.

So your xml structure for office adress should be



Hope this helps.


Arundhathi Menon
Ranch Hand

Joined: Jan 14, 2004
Posts: 113
Hi Sachet,

Thank you. That worked!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML schema validation