GeeCON Prague 2014*
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: 10146
    
165

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: 1376
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: 18570
    
    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: 12792
    
    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
 
GeeCON Prague 2014
 
subject: code to validate xml which has inline schema