wood burning stoves*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 9924
    
158

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: 1371
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: 18541
    
    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: 12759
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: code to validate xml which has inline schema
 
Similar Threads
Validating an XML File
SAXParser not calling characters()
Why isn't the parser validating an xml against a schema
Howto validate xml schema?
JAXB Custom Validation Handler is not receiving control during Exception