This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 2229
    
    7

Have you looked into those API for XML?


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to retrieve all the elements name from a xml schema
 
Similar Threads
How to create JAXB Context from File System
XML Schema validation against multiple schemas using Xerces SAX
valiating xml using multiple schemas
multiple validation errors in xml for given xsd with java
How to create a JAXB Context from File System