aspose file tools*
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
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: 2596
    
    9

Have you looked into those API for XML?


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to retrieve all the elements name from a xml schema