File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes XML validation 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 validation" Watch "XML validation" New topic

XML validation

john Chacko

Joined: Nov 10, 2003
Posts: 1
Hai Sir,
I have to import data from XML file to sql server.Before importing
the file,i want to validate the XML file with an XSD through
.But the thing is that, my xml file doesn't have a some
xml files within one tag there will be some child element and for
that child also,it can have again child elements.In some xml file it doesn't have the complexity of my validation process will
return success status for some xml files only.For some files it's
returning the "Invalid" status, even if the file is valid as per my requirement to import the data.It will be very grateful if you suggest
any method to solve thsi problem.
thanking you,
John KC
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
John, you do realize that this is JavaRanch, right? I think you'd be better off posting the question to a place like the GotDotNet forums.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Unless your question is really "what's wrong with this schema file?"
Could you post the .xsd and samples from the .xml files for us to see?
I agree. Here's the link:
subject: XML validation
It's not a secret anymore!