* @param parser
*/
private ActivationOS parseActivationOS(String tagName, XmlPullParser parser, boolean strict, String encoding)
throws IOException, XmlPullParserException
{
ActivationOS activationOS = new ActivationOS();
activationOS.setModelEncoding( encoding );
java.util.Set parsed = new java.util.HashSet();
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "name" ) )
{
if ( parsed.contains( "name" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "name" );
activationOS.setName( getTrimmedValue( parser.nextText()) );
}
else if ( parser.getName().equals( "family" ) )
{
if ( parsed.contains( "family" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "family" );
activationOS.setFamily( getTrimmedValue( parser.nextText()) );
}
else if ( parser.getName().equals( "arch" ) )
{
if ( parsed.contains( "arch" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "arch" );
activationOS.setArch( getTrimmedValue( parser.nextText()) );
}
else if ( parser.getName().equals( "version" ) )
{
if ( parsed.contains( "version" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "version" );
activationOS.setVersion( getTrimmedValue( parser.nextText()) );
}
else
{
if ( strict )
{