• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading Schema

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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.

Maha
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Maha Hassan
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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..

thanks
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Maha Hassan
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

thanks
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lots of "Schema editors" have this capability: commercial ones like XMLSpy and XMLObjective, and free things like the new Eclipse Web Dev Tools package.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic