* @param parser
*/
private ActivationFile parseActivationFile(String tagName, XmlPullParser parser, boolean strict, String encoding)
throws IOException, XmlPullParserException
{
ActivationFile activationFile = new ActivationFile();
activationFile.setModelEncoding( encoding );
java.util.Set parsed = new java.util.HashSet();
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "missing" ) )
{
if ( parsed.contains( "missing" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "missing" );
activationFile.setMissing( getTrimmedValue( parser.nextText()) );
}
else if ( parser.getName().equals( "exists" ) )
{
if ( parsed.contains( "exists" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "exists" );
activationFile.setExists( getTrimmedValue( parser.nextText()) );
}
else
{
if ( strict )
{