Java tutorial
//package com.java2s; /** * JXyDiff: An XML Diff Written in Java * * Contact: pascal.molli@loria.fr * * This software is free software; you can redistribute it and/or * modify it under the terms of QPL/CeCill * * See licences details in QPL.txt and CeCill.txt * * Initial developer: Raphael Tani * Initial Developer: Gregory Cobena * Initial Developer: Gerald Oster * Initial Developer: Pascal Molli * Initial Developer: Serge Abiteboul * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ public class Main { /** * * @param nodePath * @return */ public static int getChildPosition(String nodePath) { return Integer.parseInt(nodePath.substring(nodePath.lastIndexOf(":") + 1)); } }