* @param element
*/
private PackageGroup parsePackageGroup(String tagName, Element element, boolean strict, String encoding)
throws IOException, DocumentException
{
PackageGroup packageGroup = new PackageGroup();
packageGroup.setModelEncoding( encoding );
java.util.Set parsed = new java.util.HashSet();
for ( Iterator i = element.nodeIterator(); i.hasNext(); )
{
Node node = (Node) i.next();
if ( node.getNodeType() != Node.ELEMENT_NODE )
{
}
else
{
Element childElement = (Element) node;
if ( childElement.getName().equals( "title" ) )
{
if ( parsed.contains( "title" ) )
{
throw new DocumentException( "Duplicated tag: '" + element.getName() + "'");
}
parsed.add( "title" );
packageGroup.setTitle( getTrimmedValue( childElement.getText() ) );
}
else if ( childElement.getName().equals( "packages" ) )
{
if ( parsed.contains( "packages" ) )
{
throw new DocumentException( "Duplicated tag: '" + element.getName() + "'");
}
parsed.add( "packages" );
packageGroup.setPackages( getTrimmedValue( childElement.getText() ) );
}
else
{
if ( strict )
{