my dog learned polymorphism*
The moose likes XML and Related Technologies and the fly likes code to validate xml which has inline schema 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 "code to validate xml which has inline schema" Watch "code to validate xml which has inline schema" New topic
Author

code to validate xml which has inline schema

anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
example code to validate xml which has inline schema.

jaxp code to validate inline schema in an xml.

i pass only xml file name.

please anyone give inputs/ideas code snippets to resolve this issue.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9318
    
109

anish reddy wrote:example code to validate xml which has inline schema.



I'm not sure what that means. Could you please explain a bit more?

[My Blog] [JavaRanch Journal]
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1368
inline Schema: Is it your Schema A is importing Schema B?
anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
anish reddy wrote:example code to validate xml which has inline schema.

jaxp code to validate inline schema in an xml.

i pass only xml file name.

xml containing schema.

please anyone give inputs/ideas code snippets to resolve this issue.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18134
    
    8

What does it mean for an XML document to "contain" a schema? In particular what does your document look like?

And if it looks like what I think it looks like, why would you choose to put the schema inside the document? I don't see any use in doing that.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12681
    
    5
What parser are you using? Which version of Java?

Can't you just use the DocumentBuilderFactory.setValidating( true ) method? etc. to get the parser to validate?

Bill

Java Resources at www.wbrogden.com
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: code to validate xml which has inline schema
 
Similar Threads
Howto validate xml schema?
Validating an XML File
Why isn't the parser validating an xml against a schema
JAXB Custom Validation Handler is not receiving control during Exception
SAXParser not calling characters()