*/
private ActivationOS parseActivationOS( XmlPullParser parser, boolean strict, InputSource source )
throws IOException, XmlPullParserException
{
String tagName = parser.getName();
ActivationOS activationOS = new ActivationOS();
InputLocation _location;
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
activationOS.setLocation( "", _location );
for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
{
String name = parser.getAttributeName( i );
String value = parser.getAttributeValue( i );
if ( name.indexOf( ':' ) >= 0 )
{
// just ignore attributes with non-default namespace (for example: xmlns:xsi)
}
else
{
checkUnknownAttribute( parser, name, tagName, strict );
}
}
java.util.Set parsed = new java.util.HashSet();
while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
{
if ( checkFieldWithDuplicate( parser, "name", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
activationOS.setLocation( "name", _location );
activationOS.setName( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "family", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
activationOS.setLocation( "family", _location );
activationOS.setFamily( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "arch", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
activationOS.setLocation( "arch", _location );
activationOS.setArch( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "version", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
activationOS.setLocation( "version", _location );
activationOS.setVersion( getTrimmedValue( parser.nextText() ) );
}
else
{
checkUnknownElement( parser, strict );
}