* @return Proxy
*/
private Proxy parseProxy( String tagName, XmlPullParser parser, boolean strict )
throws IOException, XmlPullParserException
{
Proxy proxy = new Proxy();
java.util.Set parsed = new java.util.HashSet();
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( checkFieldWithDuplicate( parser, "active", null, parsed ) )
{
proxy.setActive( getBooleanValue( getTrimmedValue( parser.nextText() ), "active", parser, "true" ) );
}
else if ( checkFieldWithDuplicate( parser, "protocol", null, parsed ) )
{
proxy.setProtocol( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "username", null, parsed ) )
{
proxy.setUsername( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "password", null, parsed ) )
{
proxy.setPassword( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "port", null, parsed ) )
{
proxy.setPort( getIntegerValue( getTrimmedValue( parser.nextText() ), "port", parser, strict ) );
}
else if ( checkFieldWithDuplicate( parser, "host", null, parsed ) )
{
proxy.setHost( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "nonProxyHosts", null, parsed ) )
{
proxy.setNonProxyHosts( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "id", null, parsed ) )
{
proxy.setId( getTrimmedValue( parser.nextText() ) );
}
else
{
if ( strict )
{