nosi.core.xml.XMLExtractComponent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of igrp-core Show documentation
Show all versions of igrp-core Show documentation
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.
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 "";
}
}