• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I validate the XML schema with XML files using localpath?

 
luo luo
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just starting to learn XML schema, I met a problem, how could I validate it with a XML files just under my localpath? THANKS!
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anne,
I'm afraid you'll have to be a bit more specific about what you're trying to do... For example, what tools or APIs are you using?
 
luo luo
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, maybe I didn't make any sense here, but what I was trying to figure out is : what if I don't have a URL (or default namespace? ) to store the schema and its instance xml files but just store them on my localmachine, how can I validate it? What should I put in the
<class xmlns="x-schema:xxxxxxxx.xml"> ?
I don't know if this's a feasible way in doing it?
Thanks.
 
luo luo
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a validator from the msdn tutorial about XML, does anyone ever use it?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xmtuttut6authoringschemas.asp
 
luo luo
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, btw, I'm using SAX parser to read the XML files. Must I write some code to validate the XML files against the schema? :roll:
 
luo luo
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it, I could use the MSV to do that, thanks anyway
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic