I am wondering if there is an API that processes scheme like the dtd parser. I want to do a program that reads a schema and prints whiche element has what datatype etc.
Schemas have the advantage that they are written in XML. So you could use any XML parser to read in your schema, and write your program to use its input.
sorry i was not clear i want somehting that takes the schema and returns a tree or anything that tells me which elements are parents of which and what are the data types, etc..
And you want to write that yourself? Okay, first you have to understand XML Schema's data model, then you have to write a program that implements that understanding. Personally I would use something like XMLSpy that does that for me, instead of writing that program. But that program could be a good learning experience, I suppose.
in fact i prefere to find it(if it is already implamented ) instead of wasting time implamenting. In Dtdparser of wutka,the exmaple file used to do this for a DTD like it took a dtd and presented each element and it's type etc.. the thing is i am wondering if there is a thing like that for schema.
Lots of "Schema editors" have this capability: commercial ones like XMLSpy and XMLObjective, and free things like the new Eclipse Web Dev Tools package.