* @return SettingsSecurity
*/
private SettingsSecurity parseSettingsSecurity( String tagName, XmlPullParser parser, boolean strict )
throws IOException, XmlPullParserException
{
SettingsSecurity settingsSecurity = new SettingsSecurity();
java.util.Set parsed = new java.util.HashSet();
int eventType = parser.getEventType();
boolean foundRoot = false;
while ( eventType != XmlPullParser.END_DOCUMENT )
{
if ( eventType == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( tagName ) )
{
foundRoot = true;
}
else if ( strict && ! foundRoot )
{
throw new XmlPullParserException( "Expected root element '" + tagName + "' but found '" + parser.getName() + "'", parser, null );
}
else if ( checkFieldWithDuplicate( parser, "master", null, parsed ) )
{
settingsSecurity.setMaster( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "relocation", null, parsed ) )
{
settingsSecurity.setRelocation( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "configurations", null, parsed ) )
{
java.util.List configurations = new java.util.ArrayList/*<Config>*/();
settingsSecurity.setConfigurations( configurations );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "configuration" ) )
{
configurations.add( parseConfig( "configuration", parser, strict ) );