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.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;

public class XMLValidatorsParser {
	@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 - 2025 Weber Informatics LLC | Privacy Policy