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

nosi.core.xml.XMLExtractComponent Maven / Gradle / Ivy

Go to download

IGRP Framework is a powerful and highly customizable platform developed by the Operational Nucleus for the Information Society (NOSi) to create web applications, it provides out of box, several modules to make easy to create stand-alone, production-grade web applications: authentication and access-control, business processes automation, reporting, page builder with automatic code generation and incorporation of the Once-Only-Principle, written in Java. IGRP Framework WAR - Contains some keys resources that give UI to IGRP Framework and others supports files.

There is a newer version: 2.0.0.240912-RCM
Show newest version
package nosi.core.xml;

import nosi.core.webapp.Core;

/**
 * Emanuel
 * 5 Apr 2018
 */
public class XMLExtractComponent {


	public static String extractXML(String xml) {
		if(Core.isNotNull(xml)) {
			int start = xml.indexOf(">",xml.indexOf("".length();
			int end = xml.lastIndexOf("");
			if(start != -1 && end != -1) {
				return xml.substring(start, end);
			}
		}
		return "";
	}
	
	public static String extractXSL(String xml) {
		if(Core.isNotNull(xml)) {
			int start = xml.indexOf(">",xml.indexOf("".length();
			int end = xml.lastIndexOf("");
			if(start != -1 && end != -1) {
				return xml.substring(start, end);
			}
		}
		return "";
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy