* @return Server
*/
private Server parseServer( String tagName, XmlPullParser parser, boolean strict )
throws IOException, XmlPullParserException
{
Server server = new Server();
java.util.Set parsed = new java.util.HashSet();
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( checkFieldWithDuplicate( parser, "username", null, parsed ) )
{
server.setUsername( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "password", null, parsed ) )
{
server.setPassword( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "privateKey", null, parsed ) )
{
server.setPrivateKey( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "passphrase", null, parsed ) )
{
server.setPassphrase( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "filePermissions", null, parsed ) )
{
server.setFilePermissions( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "directoryPermissions", null, parsed ) )
{
server.setDirectoryPermissions( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "configuration", null, parsed ) )
{
server.setConfiguration( Xpp3DomBuilder.build( parser ) );
}
else if ( checkFieldWithDuplicate( parser, "id", null, parsed ) )
{
server.setId( getTrimmedValue( parser.nextText() ) );
}
else
{
if ( strict )
{