All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.anotheria.asg.generator.parser.XMLValidatorsParser Maven / Gradle / Ivy

package net.anotheria.asg.generator.parser;

import java.io.IOException;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.List;

import net.anotheria.asg.generator.view.meta.MetaValidator;

import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;

/**
 * 

XMLValidatorsParser class.

* * @author another * @version $Id: $Id */ public class XMLValidatorsParser { /** *

parseValidators.

* * @param content a {@link java.lang.String} object. * @return a {@link java.util.List} object. */ @SuppressWarnings("unchecked") public static final List parseValidators(String content){ SAXBuilder reader = new SAXBuilder(); reader.setValidation(false); List ret = new ArrayList(); try{ Document doc = reader.build(new StringReader(content)); Element root = doc.getRootElement(); List validators = root.getChildren("validator"); for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy