File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes How to call xsd file from xml file 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 "How to call xsd file from xml file" Watch "How to call xsd file from xml file" New topic

How to call xsd file from xml file

praneeth ram
Ranch Hand

Joined: Sep 21, 2009
Posts: 60
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.

<? xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="">
<xs:element name="employees" type="xsd:string"/>

<!-- Here i want to mention emp.xsd file location -->

both files are placed inside D:\praneeth folder.

Thanks & Regards,
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

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

[My Blog] [JavaRanch Journal]
I agree. Here's the link:
subject: How to call xsd file from xml file
It's not a secret anymore!