java - How to retrieve all the elements name from a xml schema -


i having problem getting name of schema elements in java. creating small xml editor can load xml schema , validate xml file against xml schema. want parse schema, every elements name , put in content assistant, user can see available elements.

i read xsom user's guide, didn't understand much...

can me implement addelementsfromschema(file xsdfile) function, because lost myself trying.

public static void addelementsfromschema(file xsdfile){  } 

it sounds primary need, @ least now, element names. can element names like:

xsomparser parser = new xsomparser(); parser.parse(xsdfile);  xsschemaset schemas = parser.getresult(); iterator<xselementdecl> = schemas.iterateelementdecls(); while (i.hasnext()) {     xselementdecl element = i.next();     string name = element.getname();     // add editor } 

showing element definitions lot more difficult, element declarations in xml schemas can quite complex.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -