This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes How to retrieve all the elements name from a xml schema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "How to retrieve all the elements name from a xml schema" Watch "How to retrieve all the elements name from a xml schema" New topic
Author

How to retrieve all the elements name from a xml schema

emil makovac
Greenhorn

Joined: Sep 05, 2013
Posts: 1
I am having a problem with getting a name of a schema elements in java. I am creating a small xml editor which can load a xml schema and validate a xml file against xml schema. I want to parse a schema, get every elements name and then put it in my content assistant, so the user can see all the available elements.

I already read XSOM User's guide, but I didn't understand much...

Can someone help me to implement my addElementsFromSchema(File xsdfile) function, because I lost myself trying.

public static void addElementsFromSchema(File xsdfile){

}
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 3042
    
    9

Have you looked into those API for XML?


K. Tsang JavaRanch SCJP5 SCJD OCPJP7 OCPWCD5 OCPBCD5 OCPWSD5 OCMJEA5 part 1 part 2/3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to retrieve all the elements name from a xml schema
 
jQuery in Action, 3rd edition