public static void xorCheck ( final Nodes nodes1 , final Nodes nodes2 , final String nodeTypeForDebugging ) throws XMLParsingException { if ( nodes1 . size ( ) > 0 && nodes2 . size ( ) > 0 ) { throw new XMLParsingException ( "Message contains more than one " + nodeTypeForDebugging + " node. Only one permitted." ) ; } }
Does nothing if only one of nodes1 or nodes2 contains more than zero nodes . Throws InvalidCfgDocException otherwise .