edu.udayton.udri.asset.hikvision/src/edu/udayton/udri/asset/hikvision/HikVisionAsset.java
private int parsingValueFromXml(final String checkLine, final String totalLine)
    {
        int result = 0;
        final int expectedLength = 6;

        final String innerLine = totalLine.substring(checkLine.length(), checkLine.length() + expectedLength);
        int count = 0;
        for (int i = 0; i < expectedLength; i++) 
        {
            final char a = innerLine.charAt(i);
            if (a == '<')
            {
                count = i;
                break;
            }
        }
        final String finalLine = innerLine.substring(0, count);
        result = Integer.parseInt(finalLine);

        return result;
    }
/**
     * Finds the value within the XML.
     * @param checkLine
     *     The String you want to start parsing after
     * @param totalLine
     *     The Full line you get back from the xml
     * @return
     *     The int value from the xml
     */
Finds the value within the XML.
@param checkLine
The String you want to start parsing after
@param totalLine
The Full line you get back from the xml
@return
The int value from the xml
Finds the value within the XML . @param checkLine The String you want to start parsing after @param totalLine The Full line you get back from the xml @return The int value from the xml
private int parsingValueFromXml(final String checkLine, final String totalLine)
    {
        int result = 0;
        final int expectedLength = 6;
        final String innerLine = totalLine.substring(checkLine.length(), checkLine.length() + expectedLength);
        int count = 0;
        for (int i = 0; i < expectedLength; i++) 
        {
            final char a = innerLine.charAt(i);
            if (a == '<')
            {
                count = i;
                break;
            }
        }
        final String finalLine = innerLine.substring(0, count);
        result = Integer.parseInt(finalLine);
        return result;
    }
private int parsingValueFromXml ( final String checkLine , final String totalLine ) { int result = 0 ; final int expectedLength = 6 ; final String innerLine = totalLine . substring ( checkLine . length ( ) , checkLine . length ( ) + expectedLength ) ; int count = 0 ; for ( int i = 0 ; i < expectedLength ; i ++ ) { final char a = innerLine . charAt ( i ) ; if ( a == '<' ) { count = i ; break ; } } final String finalLine = innerLine . substring ( 0 , count ) ; result = Integer . parseInt ( finalLine ) ; return result ; }
Finds the value within the XML.
Finds the value within the XML .