• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

code to validate xml which has inline schema

 
anish reddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
kri shan
Ranch Hand
Posts: 1460
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
inline Schema: Is it your Schema A is importing Schema B?
 
anish reddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20735
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic