List of usage examples for org.jdom2 Document getDescendants
@Override public <F extends Content> IteratorIterable<F> getDescendants(final Filter<F> filter)
From source file:org.slc.sli.ingestion.parser.impl.XsdTypeProvider.java
License:Apache License
private void buildXsdElementsMap(Document doc, Map<String, String> map) { Iterable<Element> elements = doc.getDescendants(Filters.element(ELEMENT, XS_NAMESPACE)); for (Element e : elements) { String type = getType(e); map.put(e.getAttributeValue(NAME), type); }/* w w w . ja v a 2 s .c om*/ }
From source file:org.slc.sli.ingestion.parser.impl.XsdTypeProvider.java
License:Apache License
private void parseInterchangeSchemas(Resource schemaFile, SAXBuilder b) throws JDOMException, IOException { Document doc = b.build(schemaFile.getURL()); // get interchange element name and build map for it Iterator<Element> schemaIter = doc.getDescendants(Filters.element(SCHEMA, XS_NAMESPACE)).iterator(); buildMap(schemaIter, doc, ELEMENT);/*from w w w.j a v a 2 s.c o m*/ Iterator<Element> wrapperIter = doc.getDescendants(Filters.element(ELEMENT_ACTION, XS_NAMESPACE)) .iterator(); buildMap(wrapperIter, doc, ELEMENT_ACTION); }