Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    public static String trimXml(String xml) {
        int start = 0, end = 0;

        start = xml.indexOf("<");
        if (start < 0) {
            return "";
        }

        end = xml.lastIndexOf(">");
        if (end < 0) {
            return "";
        }

        return xml.substring(start, ++end);
    }
}