Here you can find the source of getAttributes(String element, String xsd)
public static void getAttributes(String element, String xsd)
//package com.java2s; //License from project: Open Source License import java.io.File; import javax.xml.XMLConstants; import javax.xml.validation.SchemaFactory; import org.xml.sax.SAXException; public class Main { public static void getAttributes(String element, String xsd) { final SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); try {/* ww w . j av a 2 s . c o m*/ sf.newSchema(new File("customer.xsd")); } catch (final SAXException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }