That was my impression too. What on earth is the point of including the schema inside the document it's supposed to validate? Wouldn't that make the document invalid? But then I googled for "inline schema" and got a lot of links which suggested to me that a lot of people want to do this, even though I think it's a totally weird thing to do. But then I don't work in an environment where we have to deal with schemas, so my opinion doesn't count for much.
arjun ray wrote:Now question is why I want to make this file,basically I am a tester so I test this file properly update the database or not on different value or different configuration.It is very Time consuming that to ran the original application and generate the file.So I want to make this application by which I can generate this type of file in 100 times holding the same configuration or different.I want to make this using java because I know little bit of java.
Looks like the idea that you know a little bit of Java, therefore you can write this code, is not working out. Most of the links I saw for "inline schema" were Microsoft-related, so maybe it's a weird Microsoft thing. That would explain why we don't have Java support for it. So here's a couple of options you could look at instead of that:
(1) Do the time-consuming step which generates the file (that would be the document containing its own schema, right?) but this time... Save a copy of the file. Use that copy for testing from now on.
(2) Get somebody else to do the programming, either in Java or in some other language, which produces your test file in a less time-consuming way.