*/
private MailingList parseMailingList( XmlPullParser parser, boolean strict, InputSource source )
throws IOException, XmlPullParserException
{
String tagName = parser.getName();
MailingList mailingList = new MailingList();
InputLocation _location;
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
mailingList.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 );
mailingList.setLocation( "name", _location );
mailingList.setName( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "subscribe", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
mailingList.setLocation( "subscribe", _location );
mailingList.setSubscribe( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "unsubscribe", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
mailingList.setLocation( "unsubscribe", _location );
mailingList.setUnsubscribe( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "post", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
mailingList.setLocation( "post", _location );
mailingList.setPost( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "archive", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
mailingList.setLocation( "archive", _location );
mailingList.setArchive( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "otherArchives", null, parsed ) )
{
java.util.List otherArchives = new java.util.ArrayList/*<String>*/();
mailingList.setOtherArchives( otherArchives );
InputLocation _locations;
_locations = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
mailingList.setLocation( "otherArchives", _locations );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( "otherArchive".equals( parser.getName() ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );