This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call xsd file from xml file

 
praneeth ram
Ranch Hand
Posts: 60
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
My intention is when ever i invoke the xml file through browser, My xml file must be call and validated by xsd file. how can achive this. Which tag and attribute i need to write in xml file. I mentioned my file in the bellow.

emp.xsd
<? xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="employees" type="xsd:string"/>
</xsd:schema>

emp.xml
<!-- Here i want to mention emp.xsd file location -->
<employee>
praneeth
</employees>

both files are placed inside D:\praneeth folder.

Thanks & Regards,
Praneeth.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, your xsd has to specify the namespace under which the elements will be available. And once you do that, the elements in your xml can then refer to that namespace. See if this helps


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic